<!-- ##### FUNCTION gtk_drag_get_source_widget ##### -->
<para>
-Determines the source widget for a drag.
+
</para>
-@context: a (destination side) drag context.
-@Returns: if the drag is occurring within a single application,
- a pointer to the source widget. Otherwise, %NULL.
+@context:
+@Returns:
<!-- ##### FUNCTION gtk_drag_highlight ##### -->
<!-- ##### FUNCTION gtk_grab_get_current ##### -->
<para>
-Queries the current grab of the default window group.
+
</para>
-@void:
-@Returns: The widget which currently has the grab or %NULL if no grab is active.
+@void:
+@Returns:
<!-- ##### FUNCTION gtk_grab_remove ##### -->
<!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
<para>
-Returns the group to which the radio menu item belongs, as a #GList of
-#GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
+
</para>
-@radio_menu_item: a #GtkRadioMenuItem.
-@Returns: the group of @radio_menu_item.
+@radio_menu_item:
+@Returns:
* If the event contains a "device" field, this function will return
* it, else it will return %NULL.
*
- * Returns: a #GdkDevice, or %NULL.
+ * Returns: (transfer none): a #GdkDevice, or %NULL.
*
* Since: 3.0
**/
* Fetches the widget monitored by this accelerator label. See
* gtk_accel_label_set_accel_widget().
*
- * Returns: the object monitored by the accelerator label, or %NULL.
+ * Returns: (transfer none): the object monitored by the accelerator label, or %NULL.
**/
GtkWidget*
gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label)
* This function is intended for use by action implementations to
* create icons displayed in the proxy widgets.
*
- * Returns: a widget that displays the icon for this action.
+ * Returns: (transfer full): a widget that displays the icon for this action.
*
* Since: 2.4
*/
*
* Creates a menu item widget that proxies for the given action.
*
- * Returns: a menu item connected to the action.
+ * Returns: (transfer full): a menu item connected to the action.
*
* Since: 2.4
*/
*
* Creates a toolbar item widget that proxies for the given action.
*
- * Returns: a toolbar item connected to the action.
+ * Returns: (transfer full): a toolbar item connected to the action.
*
* Since: 2.4
*/
*
* Gets the gicon of @action.
*
- * Returns: The action's #GIcon if one is set.
+ * Returns: (transfer none): The action's #GIcon if one is set.
*
* Since: 2.16
*/
* item or the toolbar item it creates, this function returns an
* instance of that menu.
*
- * Return value: the menu item provided by the action, or %NULL.
+ * Return value: (transfer full): the menu item provided by the action, or %NULL.
*
* Since: 2.12
*/
*
* Gets the related #GtkAction for @activatable.
*
- * Returns: the related #GtkAction if one is set.
+ * Returns: (transfer none): the related #GtkAction if one is set.
*
* Since: 2.16
**/
GApplicationClass parent_class;
/*< vfuncs >*/
- GtkWindow *(* create_window) (GtkApplication *application);
- void (* activated) (GtkApplication *application,
+ GtkWindow *(* create_window) (GtkApplication *app);
+ void (* activated) (GtkApplication *app,
GVariant *args);
- void (* action) (GtkApplication *application,
+ void (* action) (GtkApplication *app,
const gchar *action_name);
- gboolean (* quit) (GtkApplication *application);
+ gboolean (* quit) (GtkApplication *app);
/* Padding for future expansion */
*
* Returns the child widget contained in page number @page_num.
*
- * Return value: The child widget, or %NULL if @page_num is out of bounds.
+ * Return value: (transfer none): The child widget, or %NULL
+ * if @page_num is out of bounds.
*
* Since: 2.10
**/
* gtk_assistant_get_page_header_image:
* @assistant: a #GtkAssistant
* @page: a page of @assistant
- *
- * Gets the header image for @page.
- *
- * Return value: the header image for @page, or %NULL
- * if there's no header image for the page.
+ *
+ * Gets the header image for @page.
+ *
+ * Return value: (transfer none): the header image for @page, or %NULL
+ * if there's no header image for the page.
*
* Since: 2.10
**/
* gtk_assistant_get_page_side_image:
* @assistant: a #GtkAssistant
* @page: a page of @assistant
- *
- * Gets the header image for @page.
- *
- * Return value: the side image for @page, or %NULL
- * if there's no side image for the page.
+ *
+ * Gets the header image for @page.
+ *
+ * Return value: (transfer none): the side image for @page, or %NULL
+ * if there's no side image for the page.
*
* Since: 2.10
**/
* @builder: #GtkBuilder used to construct this object
* @name: name of child to construct
*
- * Constructs a child of @buildable with the name @name.
+ * Constructs a child of @buildable with the name @name.
*
* #GtkBuilder calls this function if a "constructor" has been
* specified in the UI definition.
*
- * Returns: the constructed child
+ * Returns: (transfer full): the constructed child
*
* Since: 2.12
**/
*
* Get the internal child called @childname of the @buildable object.
*
- * Returns: the internal child of the buildable object
+ * Returns: (transfer none): the internal child of the buildable object
*
* Since: 2.12
**/
* This may have been explicitly set by gtk_button_set_image()
* or constructed by gtk_button_new_from_stock().
*
- * Return value: a #GtkWidget or %NULL in case there is no image
+ * Return value: (transfer none): a #GtkWidget or %NULL in case there is no image
*
* Since: 2.6
*/
* @cell: a #GtkCellRenderer
* @event: a #GdkEvent
* @widget: widget that received the event
- * @path: widget-dependent string representation of the event location;
+ * @path: widget-dependent string representation of the event location;
* e.g. for #GtkTreeView, a string representation of #GtkTreePath
* @background_area: background area as passed to gtk_cell_renderer_render()
* @cell_area: cell area as passed to gtk_cell_renderer_render()
* @flags: render flags
- *
+ *
* Passes an activate event to the cell renderer for possible processing.
- *
- * Return value: A new #GtkCellEditable, or %NULL
+ *
+ * Return value: (transfer full): A new #GtkCellEditable, or %NULL
**/
GtkCellEditable *
gtk_cell_renderer_start_editing (GtkCellRenderer *cell,
* gtk_cell_size_request_get_size:
* @cell: a #GtkCellSizeRequest instance
* @widget: the #GtkWidget this cell will be rendering to
- * @request_natural: Whether to base the contextual request off of the
- * base natural or the base minimum
* @minimum_size: (out) (allow-none): location for storing the minimum size, or %NULL
* @natural_size: (out) (allow-none): location for storing the natural size, or %NULL
*
* Returns the model for @cell_view. If no model is used %NULL is
* returned.
*
- * Returns: a #GtkTreeModel used or %NULL
+ * Returns: (transfer none): a #GtkTreeModel used or %NULL
*
* Since: 2.16
**/
/**
* gtk_clipboard_set_with_data:
- * @clipboard: a #GtkClipboard
- * @targets: array containing information about the available forms for the
- * clipboard data
- * @n_targets: number of elements in @targets
- * @get_func: function to call to get the actual clipboard data
- * @clear_func: when the clipboard contents are set again, this function will
- * be called, and @get_func will not be subsequently called.
- * @user_data: user data to pass to @get_func and @clear_func.
- *
+ * @clipboard: a #GtkClipboard
+ * @targets: array containing information about the available forms for the
+ * clipboard data
+ * @n_targets: number of elements in @targets
+ * @get_func: (scope async): function to call to get the actual clipboard data
+ * @clear_func: (scope async): when the clipboard contents are set again,
+ * this function will be called, and @get_func will not be subsequently
+ * called.
+ * @user_data: user data to pass to @get_func and @clear_func.
+ *
* Virtually sets the contents of the specified clipboard by providing
* a list of supported formats for the clipboard data and a function
* to call to get the actual data when it is requested.
- *
- * Return value: %TRUE if setting the clipboard data succeeded. If setting
- * the clipboard data failed the provided callback functions
- * will be ignored.
+ *
+ * Return value: %TRUE if setting the clipboard data succeeded.
+ * If setting the clipboard data failed the provided callback
+ * functions will be ignored.
**/
gboolean
gtk_clipboard_set_with_data (GtkClipboard *clipboard,
/**
* gtk_clipboard_set_with_owner:
- * @clipboard: a #GtkClipboard
- * @targets: array containing information about the available forms for the
- * clipboard data
- * @n_targets: number of elements in @targets
- * @get_func: function to call to get the actual clipboard data
- * @clear_func: when the clipboard contents are set again, this function will
- * be called, and @get_func will not be subsequently called.
- * @owner: an object that "owns" the data. This object will be passed
- * to the callbacks when called.
- *
+ * @clipboard: a #GtkClipboard
+ * @targets: array containing information about the available forms for
+ * the clipboard data
+ * @n_targets: number of elements in @targets
+ * @get_func: (scope async): function to call to get the actual clipboard data
+ * @clear_func: (scope async): when the clipboard contents are set again,
+ * this function will be called, and @get_func will not be subsequently
+ * called
+ * @owner: an object that "owns" the data. This object will be passed
+ * to the callbacks when called
+ *
* Virtually sets the contents of the specified clipboard by providing
* a list of supported formats for the clipboard data and a function
* to call to get the actual data when it is requested.
*
* The difference between this function and gtk_clipboard_set_with_data()
* is that instead of an generic @user_data pointer, a #GObject is passed
- * in.
- *
- * Return value: %TRUE if setting the clipboard data succeeded. If setting
- * the clipboard data failed the provided callback functions
- * will be ignored.
+ * in.
+ *
+ * Return value: %TRUE if setting the clipboard data succeeded.
+ * If setting the clipboard data failed the provided callback
+ * functions will be ignored.
**/
gboolean
gtk_clipboard_set_with_owner (GtkClipboard *clipboard,
/**
* gtk_clipboard_get_owner:
* @clipboard: a #GtkClipboard
- *
- * If the clipboard contents callbacks were set with
- * gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
- * gtk_clipboard_clear() has not subsequently called, returns the owner set
+ *
+ * If the clipboard contents callbacks were set with
+ * gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
+ * gtk_clipboard_clear() has not subsequently called, returns the owner set
* by gtk_clipboard_set_with_owner().
- *
- * Return value: the owner of the clipboard, if any; otherwise %NULL.
+ *
+ * Return value: (transfer none): the owner of the clipboard, if any;
+ * otherwise %NULL.
**/
GObject *
gtk_clipboard_get_owner (GtkClipboard *clipboard)
/**
* gtk_clipboard_request_contents:
* @clipboard: a #GtkClipboard
- * @target: an atom representing the form into which the clipboard
- * owner should convert the selection.
- * @callback: A function to call when the results are received
- * (or the retrieval fails). If the retrieval fails
- * the length field of @selection_data will be
- * negative.
+ * @target: an atom representing the form into which the clipboard
+ * owner should convert the selection.
+ * @callback: (scope async): A function to call when the results are received
+ * (or the retrieval fails). If the retrieval fails the length field of
+ * @selection_data will be negative.
* @user_data: user data to pass to @callback
- *
+ *
* Requests the contents of clipboard as the given target.
* When the results of the result are later received the supplied callback
* will be called.
/**
* gtk_clipboard_request_text:
* @clipboard: a #GtkClipboard
- * @callback: a function to call when the text is received,
- * or the retrieval fails. (It will always be called
- * one way or the other.)
+ * @callback: (scope async): a function to call when the text is received,
+ * or the retrieval fails. (It will always be called one way or the other.)
* @user_data: user data to pass to @callback.
- *
+ *
* Requests the contents of the clipboard as text. When the text is
* later received, it will be converted to UTF-8 if necessary, and
- * @callback will be called.
+ * @callback will be called.
*
* The @text parameter to @callback will contain the resulting text if
* the request succeeded, or %NULL if it failed. This could happen for
/**
* gtk_clipboard_request_rich_text:
* @clipboard: a #GtkClipboard
- * @buffer: a #GtkTextBuffer
- * @callback: a function to call when the text is received,
- * or the retrieval fails. (It will always be called
- * one way or the other.)
+ * @buffer: a #GtkTextBuffer
+ * @callback: (scope async): a function to call when the text is received,
+ * or the retrieval fails. (It will always be called one way or the other.)
* @user_data: user data to pass to @callback.
*
* Requests the contents of the clipboard as rich text. When the rich
/**
* gtk_clipboard_request_image:
* @clipboard: a #GtkClipboard
- * @callback: a function to call when the image is received,
- * or the retrieval fails. (It will always be called
- * one way or the other.)
+ * @callback: (scope async): a function to call when the image is received,
+ * or the retrieval fails. (It will always be called one way or the other.)
* @user_data: user data to pass to @callback.
- *
+ *
* Requests the contents of the clipboard as image. When the image is
* later received, it will be converted to a #GdkPixbuf, and
- * @callback will be called.
+ * @callback will be called.
*
- * The @pixbuf parameter to @callback will contain the resulting
- * #GdkPixbuf if the request succeeded, or %NULL if it failed. This
- * could happen for various reasons, in particular if the clipboard
- * was empty or if the contents of the clipboard could not be
+ * The @pixbuf parameter to @callback will contain the resulting
+ * #GdkPixbuf if the request succeeded, or %NULL if it failed. This
+ * could happen for various reasons, in particular if the clipboard
+ * was empty or if the contents of the clipboard could not be
* converted into an image.
*
* Since: 2.6
/**
* gtk_clipboard_request_uris:
* @clipboard: a #GtkClipboard
- * @callback: a function to call when the URIs are received,
- * or the retrieval fails. (It will always be called
- * one way or the other.)
+ * @callback: (scope async): a function to call when the URIs are received,
+ * or the retrieval fails. (It will always be called one way or the other.)
* @user_data: user data to pass to @callback.
- *
+ *
* Requests the contents of the clipboard as URIs. When the URIs are
* later received @callback will be called.
*
/**
* gtk_clipboard_request_targets:
* @clipboard: a #GtkClipboard
- * @callback: a function to call when the targets are received,
- * or the retrieval fails. (It will always be called
- * one way or the other.)
+ * @callback: (scope async): a function to call when the targets are
+ * received, or the retrieval fails. (It will always be called
+ * one way or the other.)
* @user_data: user data to pass to @callback.
- *
- * Requests the contents of the clipboard as list of supported targets.
- * When the list is later received, @callback will be called.
+ *
+ * Requests the contents of the clipboard as list of supported targets.
+ * When the list is later received, @callback will be called.
*
* The @targets parameter to @callback will contain the resulting targets if
* the request succeeded, or %NULL if it failed.
/**
* gtk_clipboard_wait_for_image:
* @clipboard: a #GtkClipboard
- *
+ *
* Requests the contents of the clipboard as image and converts
* the result to a #GdkPixbuf. This function waits for
* the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
- *
- * Return value: a newly-allocated #GdkPixbuf object which must
- * be disposed with g_object_unref(), or %NULL if
- * retrieving the selection data failed. (This
- * could happen for various reasons, in particular
- * if the clipboard was empty or if the contents of
- * the clipboard could not be converted into an image.)
+ *
+ * Return value: (transfer full): a newly-allocated #GdkPixbuf
+ * object which must be disposed with g_object_unref(), or
+ * %NULL if retrieving the selection data failed. (This could
+ * happen for various reasons, in particular if the clipboard
+ * was empty or if the contents of the clipboard could not be
+ * converted into an image.)
*
* Since: 2.6
**/
*
* Gets the #GdkDisplay associated with @clipboard
*
- * Return value: the #GdkDisplay associated with @clipboard
+ * Return value: (transfer none): the #GdkDisplay associated with @clipboard
*
* Since: 2.2
**/
*
* Retrieves the #GtkColorSelection widget embedded in the dialog.
*
- * Returns: the embedded #GtkColorSelection
+ * Returns: (transfer none): the embedded #GtkColorSelection
*
* Since: 2.14
**/
}
/**
- * gtk_combo_box_get_model
+ * gtk_combo_box_get_model:
* @combo_box: A #GtkComboBox
*
* Returns the #GtkTreeModel which is acting as data source for @combo_box.
*
- * Return value: (transfer none): A #GtkTreeModel which was passed during construction.
+ * Return value: (transfer none): A #GtkTreeModel which was passed
+ * during construction.
*
* Since: 2.4
*/
* This function is mostly intended for use by accessibility technologies;
* applications should have little use for it.
*
- * Returns: the accessible object corresponding to the combo box's popup.
+ * Returns: (transfer none): the accessible object corresponding
+ * to the combo box's popup.
*
* Since: 2.6
*/
/**
* gtk_container_foreach:
* @container: a #GtkContainer
- * @callback: a callback
+ * @callback: (scope call): a callback
* @callback_data: callback user data
*
* Invokes @callback on each non-internal child of @container. See
}
-/*************************************************************
+/**
* gtk_drag_get_source_widget:
- * Get the widget the was the source of this drag, if
- * the drag originated from this application.
- * arguments:
- * context: The drag context for this drag
- * results:
- * The source widget, or NULL if the drag originated from
- * a different application.
- *************************************************************/
-
+ * @context: a (destination side) drag context
+ *
+ * Determines the source widget for a drag.
+ *
+ * Return value: (transfer none): if the drag is occurring
+ * within a single application, a pointer to the source widget.
+ * Otherwise, %NULL.
+ */
GtkWidget *
gtk_drag_get_source_widget (GdkDragContext *context)
{
* @context: drag context
* @target_list: (allow-none): list of droppable targets, or %NULL to use
* gtk_drag_dest_get_target_list (@widget).
- *
+ *
* Looks for a match between @context->targets and the
* @dest_target_list, returning the first matching target, otherwise
* returning %GDK_NONE. @dest_target_list should usually be the return
* have different valid targets for different parts of the widget; in
* that case, they will have to implement a drag_motion handler that
* passes the correct target list to this function.
- *
+ *
* Return value: first target that the source offers and the dest can accept, or %GDK_NONE
**/
GdkAtom
* @actions: A bitmask of the allowed drag actions for this drag.
* @button: The button the user clicked to start the drag.
* @event: The event that triggered the start of the drag.
- *
+ *
* Initiates a drag on the source side. The function
* only needs to be used when the application is
* starting drags itself, and is not needed when
* used by GTK+ to get information about the start position of the drag, for
* example if the @event is a GDK_MOTION_NOTIFY.
*
- * Generally there are three cases when you want to start a drag by hand by calling
- * this function:
+ * Generally there are three cases when you want to start a drag by hand by
+ * calling this function:
*
- * 1. During a button-press-event handler, if you want to start a drag immediately
- * when the user presses the mouse button. Pass the @event that you have in your
- * button-press-event handler.
+ * 1. During a button-press-event handler, if you want to start a drag
+ * immediately when the user presses the mouse button. Pass the @event
+ * that you have in your button-press-event handler.
*
- * 2. During a motion-notify-event handler, if you want to start a drag when the mouse
- * moves past a certain threshold distance after a button-press. Pass the @event that you
- * have in your motion-notify-event handler.
+ * 2. During a motion-notify-event handler, if you want to start a drag
+ * when the mouse moves past a certain threshold distance after a button-press.
+ * Pass the @event that you have in your motion-notify-event handler.
*
* 3. During a timeout handler, if you want to start a drag after the mouse
* button is held down for some time. Try to save the last event that you got
* from the mouse, using gdk_event_copy(), and pass it to this function
- * (remember to free the event with gdk_event_free() when you are done). If you
- * can really not pass a real event, pass #NULL instead.
- *
+ * (remember to free the event with gdk_event_free() when you are done).
+ * If you can really not pass a real event, pass #NULL instead.
+ *
* Return value: the context for this drag.
**/
GdkDragContext *
*
* Since: 2.18
*
- * Returns: A #GtkEntryBuffer object.
+ * Returns: (transfer none): A #GtkEntryBuffer object.
*/
GtkEntryBuffer*
gtk_entry_get_buffer (GtkEntry *entry)
*
* See also gtk_entry_get_icon_window().
*
- * Return value: the entry's text window.
+ * Return value: (transfer none): the entry's text window.
*
* Since: 2.20
**/
* method will work regardless of whether the icon was set using a
* #GdkPixbuf, a #GIcon, a stock item, or an icon name.
*
- * Returns: A #GdkPixbuf, or %NULL if no icon is set for this position.
+ * Returns: (transfer none): A #GdkPixbuf, or %NULL if no icon is
+ * set for this position.
*
* Since: 2.16
*/
* no icon or if the icon was set by some other method (e.g., by
* stock, pixbuf, or icon name).
*
- * Returns: A #GIcon, or %NULL if no icon is set or if the icon
- * is not a #GIcon
+ * Returns: (transfer none): A #GIcon, or %NULL if no icon is set
+ * or if the icon is not a #GIcon
*
* Since: 2.16
*/
*
* See also gtk_entry_get_text_window().
*
- * Return value: the entry's icon window at @icon_pos.
+ * Return value: (transfer none): the entry's icon window at @icon_pos.
*
* Since: 2.20
*/
*
* Returns the auxiliary completion object currently in use by @entry.
*
- * Return value: The auxiliary completion object currently in use by @entry.
+ * Return value: (transfer none): The auxiliary completion object currently
+ * in use by @entry.
*
* Since: 2.4
*/
*
* Gets the entry @completion has been attached to.
*
- * Return value: The entry @completion has been attached to.
+ * Return value: (transfer none): The entry @completion has been attached to.
*
* Since: 2.4
*/
* Returns the model the #GtkEntryCompletion is using as data source.
* Returns %NULL if the model is unset.
*
- * Return value: A #GtkTreeModel, or %NULL if none is currently being used.
+ * Return value: (transfer none): A #GtkTreeModel, or %NULL if none
+ * is currently being used.
*
* Since: 2.4
*/
if (!completion->priv->filter_model)
return NULL;
-
+
return gtk_tree_model_filter_get_model (completion->priv->filter_model);
}
* Retrieves the label widget for the frame. See
* gtk_expander_set_label_widget().
*
- * Return value: the label widget, or %NULL if there is none.
- *
+ * Return value: (transfer none): the label widget,
+ * or %NULL if there is none.
+ *
* Since: 2.4
**/
GtkWidget *
/**
* gtk_file_chooser_get_current_folder_uri:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the current folder of @chooser as an URI.
* See gtk_file_chooser_set_current_folder_uri().
*
* @chooser: a #GtkFileChooser
* @file: the #GFile for the new folder
* @error: (allow-none): location to store error, or %NULL.
- *
+ *
* Sets the current folder for @chooser from a #GFile.
* Internal function, see gtk_file_chooser_set_current_folder_uri().
*
/**
* gtk_file_chooser_get_current_folder_file:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the current folder of @chooser as #GFile.
* See gtk_file_chooser_get_current_folder_uri().
- *
- * Return value: the #GFile for the current folder.
+ *
+ * Return value: (transfer full): the #GFile for the current folder.
*
* Since: 2.14
*/
{
g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), NULL);
- return GTK_FILE_CHOOSER_GET_IFACE (chooser)->get_current_folder (chooser);
+ return GTK_FILE_CHOOSER_GET_IFACE (chooser)->get_current_folder (chooser);
}
/**
* If the file chooser is in folder mode, this function returns the selected
* folder.
*
- * Returns: a selected #GFile. You own the returned file; use
- * g_object_unref() to release it.
+ * Returns: (transfer full): a selected #GFile. You own the returned file;
+ * use g_object_unref() to release it.
*
* Since: 2.14
**/
/**
* gtk_file_chooser_get_preview_widget:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the current preview widget; see
* gtk_file_chooser_set_preview_widget().
- *
- * Return value: the current preview widget, or %NULL
+ *
+ * Return value: (transfer none): the current preview widget, or %NULL
*
* Since: 2.4
**/
/**
* gtk_file_chooser_get_preview_file:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the #GFile that should be previewed in a custom preview
* Internal function, see gtk_file_chooser_get_preview_uri().
- *
- * Return value: the #GFile for the file to preview, or %NULL if no file
- * is selected. Free with g_object_unref().
+ *
+ * Return value: (transfer none): the #GFile for the file to preview,
+ * or %NULL if no file is selected. Free with g_object_unref().
*
* Since: 2.14
**/
/**
* gtk_file_chooser_get_extra_widget:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the current preview widget; see
* gtk_file_chooser_set_extra_widget().
- *
- * Return value: the current extra widget, or %NULL
+ *
+ * Return value: (transfer none): the current extra widget, or %NULL
*
* Since: 2.4
**/
/**
* gtk_file_chooser_get_filter:
* @chooser: a #GtkFileChooser
- *
+ *
* Gets the current filter; see gtk_file_chooser_set_filter().
- *
- * Return value: the current filter, or %NULL
+ *
+ * Return value: (transfer none): the current filter, or %NULL
*
* Since: 2.4
**/
*
* This returns the #GtkTreeView that lists font families, for
* example, 'Sans', 'Serif', etc.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* This returns the #GtkTreeView which lists all styles available for
* the selected font. For example, 'Regular', 'Bold', etc.
*
- * Return value: A #GtkWidget that is part of @fontsel
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* @fontsel: a #GtkFontSelection
*
* This returns the #GtkEntry used to allow the user to edit the font
- * number manually instead of selecting it from the list of font sizes.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ * number manually instead of selecting it from the list of font sizes.
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* gtk_font_selection_get_size_list:
* @fontsel: a #GtkFontSelection
*
- * This returns the #GtkTreeeView used to list font sizes.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ * This returns the #GtkTreeeView used to list font sizes.
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_preview_entry:
* @fontsel: a #GtkFontSelection
- *
+ *
* This returns the #GtkEntry used to display the font as a preview.
*
- * Return value: A #GtkWidget that is part of @fontsel
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_family:
* @fontsel: a #GtkFontSelection
- *
+ *
* Gets the #PangoFontFamily representing the selected font family.
*
- * Return value: A #PangoFontFamily representing the selected font
- * family. Font families are a collection of font faces. The
- * returned object is owned by @fontsel and must not be modified
- * or freed.
+ * Return value: (transfer none): A #PangoFontFamily representing the
+ * selected font family. Font families are a collection of font
+ * faces. The returned object is owned by @fontsel and must not
+ * be modified or freed.
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_face:
* @fontsel: a #GtkFontSelection
- *
+ *
* Gets the #PangoFontFace representing the selected font group
- * details (i.e. family, slant, weight, width, etc).
+ * details (i.e. family, slant, weight, width, etc).
*
- * Return value: A #PangoFontFace representing the selected font
- * group details. The returned object is owned by @fontsel and
- * must not be modified or freed.
+ * Return value: (transfer none): A #PangoFontFace representing the
+ * selected font group details. The returned object is owned by
+ * @fontsel and must not be modified or freed.
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_size:
* @fontsel: a #GtkFontSelection
- *
+ *
* The selected font size.
*
- * Return value: A n integer representing the selected font size,
+ * Return value: A n integer representing the selected font size,
* or -1 if no font size is selected.
*
* Since: 2.14
/**
* gtk_font_selection_dialog_get_font_selection:
- * @colorsel: a #GtkFontSelectionDialog
+ * @fsd: a #GtkFontSelectionDialog
*
* Retrieves the #GtkFontSelection widget embedded in the dialog.
*
- * Returns: the embedded #GtkFontSelection
+ * Returns: (transfer none): the embedded #GtkFontSelection
*
* Since: 2.22
**/
*
* Gets the 'OK' button.
*
- * Return value: the #GtkWidget used in the dialog for the 'OK' button.
+ * Return value: (transfer none): the #GtkWidget used in the dialog
+ * for the 'OK' button.
*
* Since: 2.14
*/
*
* Gets the 'Cancel' button.
*
- * Return value: the #GtkWidget used in the dialog for the 'Cancel' button.
+ * Return value: (transfer none): the #GtkWidget used in the dialog
+ * for the 'Cancel' button.
*
* Since: 2.14
*/
* Retrieves the label widget for the frame. See
* gtk_frame_set_label_widget().
*
- * Return value: the label widget, or %NULL if there is none.
+ * Return value: (transfer none): the label widget, or %NULL if there is none.
**/
GtkWidget *
gtk_frame_get_label_widget (GtkFrame *frame)
* (perhaps because an image file fails to load), a default "missing
* image" icon will be returned instead.
*
- * Return value: a #GdkPixbuf to be displayed
+ * Return value: (transfer full): a #GdkPixbuf to be displayed
*/
GdkPixbuf*
gtk_icon_set_render_icon (GtkIconSet *icon_set,
* virtual function. The reference count on the pixbuf is
* not incremented.
*
- * Return value: source pixbuf
+ * Return value: (transfer none): source pixbuf
*/
GdkPixbuf*
gtk_icon_source_get_pixbuf (const GtkIconSource *source)
* @icon_theme: a #GtkIconTheme
* @icon_name: the name of the icon to lookup
* @size: the desired icon size. The resulting icon may not be
- * exactly this size; see gtk_icon_info_load_icon().
+ * exactly this size; see gtk_icon_info_load_icon().
* @flags: flags modifying the behavior of the icon lookup
- * @error: (allow-none): Location to store error information on failure, or %NULL.
- *
+ * @error: (allow-none): Location to store error information on failure,
+ * or %NULL.
+ *
* Looks up an icon in an icon theme, scales it to the given size
* and renders it into a pixbuf. This is a convenience function;
* if more details about the icon are needed, use
* gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_icon().
*
* Note that you probably want to listen for icon theme changes and
- * update the icon. This is usually done by connecting to the
+ * update the icon. This is usually done by connecting to the
* GtkWidget::style-set signal. If for some reason you do not want to
* update the icon when the icon theme changes, you should consider
* using gdk_pixbuf_copy() to make a private copy of the pixbuf
- * returned by this function. Otherwise GTK+ may need to keep the old
+ * returned by this function. Otherwise GTK+ may need to keep the old
* icon theme loaded, which would be a waste of memory.
- *
- * Return value: the rendered icon; this may be a newly created icon
- * or a new reference to an internal icon, so you must not modify
- * the icon. Use g_object_unref() to release your reference to the
- * icon. %NULL if the icon isn't found.
+ *
+ * Return value: (transfer full): the rendered icon; this may be a
+ * newly created icon or a new reference to an internal icon, so
+ * you must not modify the icon. Use g_object_unref() to release
+ * your reference to the icon. %NULL if the icon isn't found.
*
* Since: 2.4
**/
/**
* gtk_icon_info_load_icon:
* @icon_info: a #GtkIconInfo structure from gtk_icon_theme_lookup_icon()
- * @error: (allow-none): location to store error information on failure, or %NULL.
- *
+ * @error: (allow-none): location to store error information on failure,
+ * or %NULL.
+ *
* Renders an icon previously looked up in an icon theme using
* gtk_icon_theme_lookup_icon(); the size will be based on the size
* passed to gtk_icon_theme_lookup_icon(). Note that the resulting
* up too far. (This maintains sharpness.). This behaviour can be changed
* by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
* the #GtkIconInfo. If this flag has been specified, the pixbuf
- * returned by this function will be scaled to the exact size.
- *
- * Return value: the rendered icon; this may be a newly created icon
- * or a new reference to an internal icon, so you must not modify
- * the icon. Use g_object_unref() to release your reference to the
- * icon.
+ * returned by this function will be scaled to the exact size.
+ *
+ * Return value: (transfer full): the rendered icon; this may be a newly
+ * created icon or a new reference to an internal icon, so you must
+ * not modify the icon. Use g_object_unref() to release your reference
+ * to the icon.
*
* Since: 2.4
**/
* See the <ulink url="http://www.freedesktop.org/wiki/SymbolicIcons">Symbolic Icons spec</ulink>
* for more information about symbolic icons.
*
- * Return value: a #GdkPixbuf representing the loaded icon
+ * Return value: (transfer full): a #GdkPixbuf representing the loaded icon
*
* Since: 3.0
**/
*
* See gtk_icon_info_load_symbolic() for more details.
*
- * Return value: a #GdkPixbuf representing the loaded icon
+ * Return value: (transfer full): a #GdkPixbuf representing the loaded icon
*
* Since: 3.0
**/
/**
* gtk_icon_view_selected_foreach:
* @icon_view: A #GtkIconView.
- * @func: The function to call for each selected icon.
+ * @func: (scope call): The function to call for each selected icon.
* @data: User data to pass to the function.
*
* Calls a function for each selected icon. Note that the model or
* Returns the model the #GtkIconView is based on. Returns %NULL if the
* model is unset.
*
- * Return value: A #GtkTreeModel, or %NULL if none is currently being used.
+ * Return value: (transfer none): A #GtkTreeModel, or %NULL if none is
+ * currently being used.
*
* Since: 2.6
**/
* @icon_view: a #GtkIconView
* @path: a #GtkTreePath in @icon_view
*
- * Creates a #GdkPixmap representation of the item at @path.
+ * Creates a #GdkPixmap representation of the item at @path.
* This image is used for a drag icon.
*
- * Return value: a newly-allocated pixmap of the drag icon.
+ * Return value: (transfer full): a newly-allocated pixmap of the drag icon.
*
* Since: 2.8
**/
/**
* gtk_image_menu_item_get_image:
- * @image_menu_item: a #GtkImageMenuItem.
- * @returns: the widget set as image of @image_menu_item.
+ * @image_menu_item: a #GtkImageMenuItem
*
* Gets the widget that is currently set as the image of @image_menu_item.
* See gtk_image_menu_item_set_image().
+ *
+ * Return value: (transfer none): the widget set as image of @image_menu_item
**/
GtkWidget*
gtk_image_menu_item_get_image (GtkImageMenuItem *image_menu_item)
*
* Returns the action area of @info_bar.
*
- * Returns: the action area.
+ * Returns: (transfer none): the action area
*
* Since: 2.18
*/
*
* Returns the content area of @info_bar.
*
- * Returns: the content area.
+ * Returns: (transfer none): the content area
*
* Since: 2.18
*/
* to the end of the info bars's action area. The button widget is
* returned, but usually you don't need it.
*
- * Returns: the button widget that was added
+ * Returns: (transfer none): the button widget that was added
*
* Since: 2.18
*/
*
* Returns the #GdkScreen object associated with @invisible
*
- * Return value: the associated #GdkScreen.
+ * Return value: (transfer none): the associated #GdkScreen.
*
* Since: 2.2
**/
* Retrieves the target of the mnemonic (keyboard shortcut) of this
* label. See gtk_label_set_mnemonic_widget().
*
- * Return value: the target of the label's mnemonic, or %NULL if none
- * has been set and the default algorithm will be used.
+ * Return value: (transfer none): the target of the label's mnemonic,
+ * or %NULL if none has been set and the default algorithm will be used.
**/
GtkWidget *
gtk_label_get_mnemonic_widget (GtkLabel *label)
/**
* gtk_layout_get_bin_window:
* @layout: a #GtkLayout
- *
+ *
* Retrieve the bin window of the layout used for drawing operations.
- *
- * Return value: a #GdkWindow
+ *
+ * Return value: (transfer none): a #GdkWindow
*
* Since: 2.14
**/
/**
* gtk_layout_get_hadjustment:
* @layout: a #GtkLayout
- *
+ *
* This function should only be called after the layout has been
* placed in a #GtkScrolledWindow or otherwise configured for
* scrolling. It returns the #GtkAdjustment used for communication
* between the horizontal scrollbar and @layout.
*
* See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
- *
- * Return value: horizontal scroll adjustment
+ *
+ * Return value: (transfer none): horizontal scroll adjustment
**/
-GtkAdjustment*
-gtk_layout_get_hadjustment (GtkLayout *layout)
+GtkAdjustment*
+gtk_layout_get_hadjustment (GtkLayout *layout)
{
g_return_val_if_fail (GTK_IS_LAYOUT (layout), NULL);
/**
* gtk_layout_get_vadjustment:
* @layout: a #GtkLayout
- *
+ *
* This function should only be called after the layout has been
* placed in a #GtkScrolledWindow or otherwise configured for
* scrolling. It returns the #GtkAdjustment used for communication
* between the vertical scrollbar and @layout.
*
* See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
- *
- * Return value: vertical scroll adjustment
+ *
+ * Return value: (transfer none): vertical scroll adjustment
**/
-GtkAdjustment*
-gtk_layout_get_vadjustment (GtkLayout *layout)
+GtkAdjustment*
+gtk_layout_get_vadjustment (GtkLayout *layout)
{
g_return_val_if_fail (GTK_IS_LAYOUT (layout), NULL);
}
}
+/**
+ * gtk_grab_get_current:
+ *
+ * Queries the current grab of the default window group.
+ *
+ * Return value: (transfer none): The widget which currently
+ * has the grab or %NULL if no grab is active
+ */
GtkWidget*
gtk_grab_get_current (void)
{
* If there is a current event and it has a device, return that
* device, otherwise return %NULL.
*
- * Returns: a #GdkDevice, or %NULL
+ * Returns: (transfer none): a #GdkDevice, or %NULL
**/
GdkDevice *
gtk_get_current_event_device (void)
* returns %NULL, otherwise returns the widget that received the event
* originally.
*
- * Return value: the widget that originally received @event, or %NULL
+ * Return value: (transfer none): the widget that originally
+ * received @event, or %NULL
**/
GtkWidget*
gtk_get_event_widget (GdkEvent *event)
* gtk_menu_item_get_submenu:
* @menu_item: a #GtkMenuItem
*
- * Gets the submenu underneath this menu item, if any. See
- * gtk_menu_item_set_submenu().
+ * Gets the submenu underneath this menu item, if any.
+ * See gtk_menu_item_set_submenu().
*
- * Return value: submenu for this menu item, or %NULL if none.
+ * Return value: (transfer none): submenu for this menu item, or %NULL if none.
**/
GtkWidget *
gtk_menu_item_get_submenu (GtkMenuItem *menu_item)
*
* Gets the #GtkMenu associated with #GtkMenuToolButton.
*
- * Return value: the #GtkMenu associated with #GtkMenuToolButton
+ * Return value: (transfer none): the #GtkMenu associated
+ * with #GtkMenuToolButton
*
* Since: 2.6
**/
*
* Gets the dialog's image.
*
- * Return value: the dialog's image
+ * Return value: (transfer none): the dialog's image
*
* Since: 2.14
**/
* gtk_message_dialog_get_message_area:
* @message_dialog: a #GtkMessageDialog
*
- * Return value: A #GtkVBox corresponding to the "message area" in the
- * @message_dialog. This is the box where the dialog's primary and secondary
- * labels are packed. You can add your own extra content to that box and it
- * will appear below those labels, on the right side of the dialog's image (or
- * on the left for right-to-left languages). See gtk_dialog_get_content_area()
- * for the corresponding function in the parent #GtkDialog.
+ * Returns the message area of the dialog. This is the box where the
+ * dialog's primary and secondary labels are packed. You can add your
+ * own extra content to that box and it will appear below those labels,
+ * on the right side of the dialog's image (or on the left for right-to-left
+ * languages). See gtk_dialog_get_content_area() for the corresponding
+ * function in the parent #GtkDialog.
+ *
+ * Return value: (transfer none): A #GtkVBox corresponding to the
+ * "message area" in the @message_dialog.
*
* Since: 2.22
**/
*
* Gets the transient parent used by the #GtkMountOperation
*
- * Returns: the transient parent for windows shown by @op
+ * Returns: (transfer none): the transient parent for windows shown by @op
*
* Since: 2.14
*/
* gtk_mount_operation_get_screen:
* @op: a #GtkMountOperation
*
- * Gets the screen on which windows of the #GtkMountOperation
+ * Gets the screen on which windows of the #GtkMountOperation
* will be shown.
*
- * Returns: the screen on which windows of @op are shown
+ * Returns: (transfer none): the screen on which windows of @op are shown
*
* Since: 2.14
*/
* gtk_notebook_get_menu_label:
* @notebook: a #GtkNotebook
* @child: a widget contained in a page of @notebook
- *
+ *
* Retrieves the menu label widget of the page containing @child.
- *
- * Return value: the menu label, or %NULL if the
- * notebook page does not have a menu label other
- * than the default (the tab label).
+ *
+ * Return value: (transfer none): the menu label, or %NULL if the
+ * notebook page does not have a menu label other than the
+ * default (the tab label).
**/
GtkWidget*
gtk_notebook_get_menu_label (GtkNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return NULL;
if (GTK_NOTEBOOK_PAGE (list)->default_menu)
return NULL;
return GTK_NOTEBOOK_PAGE (list)->menu_label;
-}
+}
/**
* gtk_notebook_set_menu_label:
/**
* gtk_notebook_get_group:
* @notebook: a #GtkNotebook
- *
+ *
* Gets the current group identificator pointer for @notebook.
- *
- * Return Value: the group identificator, or %NULL if none is set.
+ *
+ * Return Value: (transfer none): the group identificator,
+ * or %NULL if none is set.
*
* Since: 2.12
**/
*
* Gets one of the action widgets. See gtk_notebook_set_action_widget().
*
- * Returns: The action widget with the given @pack_type or
- * %NULL when this action widget has not been set
+ * Returns: (transfer none): The action widget with the given @pack_type
+ * or %NULL when this action widget has not been set
*
* Since: 2.20
*/
* a #GdkPixmap. If you need to keep this around over window
* resizes then you should add a reference to it.
*
- * Returns: A #GdkPixmap pointer to the offscreen pixmap, or %NULL.
+ * Returns: (transfer none): A #GdkPixmap pointer to the offscreen pixmap,
+ * or %NULL.
*
* Since: 2.20
*/
* and the application should unreference it once it is no longer
* needed.
*
- * Returns: A #GdkPixbuf pointer, or %NULL.
+ * Returns: (transfer full): A #GdkPixbuf pointer, or %NULL.
*
* Since: 2.20
*/
/**
* gtk_page_setup_copy:
* @other: the #GtkPageSetup to copy
- *
+ *
* Copies a #GtkPageSetup.
- *
- * Return value: a copy of @other
+ *
+ * Return value: (transfer full): a copy of @other
*
* Since: 2.10
*/
*
* Obtains the first child of the paned widget.
*
- * Return value: first child, or %NULL if it is not set.
+ * Return value: (transfer none): first child, or %NULL if it is not set.
*
* Since: 2.4
**/
*
* Obtains the second child of the paned widget.
*
- * Return value: second child, or %NULL if it is not set.
+ * Return value: (transfer none): second child, or %NULL if it is not set.
*
* Since: 2.4
**/
* enables the callback to distinguish between the window
* of the paned, a child and the handle.
*
- * Return value: the paned's handle window.
+ * Return value: (transfer none): the paned's handle window.
*
* Since: 2.20
**/
*
* Retrieves the socket the plug is embedded in.
*
- * Return value: the window of the socket, or %NULL
+ * Return value: (transfer none): the window of the socket, or %NULL
*
* Since: 2.14
**/
/**
* gtk_plug_new_for_display:
- * @display : the #GdkDisplay on which @socket_id is displayed
+ * @display: the #GdkDisplay on which @socket_id is displayed
* @socket_id: the XID of the socket's window.
*
* Create a new plug widget inside the #GtkSocket identified by socket_id.
* Obtains the #GtkPageSetup that determines the page
* dimensions of the #GtkPrintContext.
*
- * Return value: the page setup of @context
+ * Return value: (transfer none): the page setup of @context
*
* Since: 2.10
*/
* gtk_print_context_get_pango_fontmap:
* @context: a #GtkPrintContext
*
- * Returns a #PangoFontMap that is suitable for use
+ * Returns a #PangoFontMap that is suitable for use
* with the #GtkPrintContext.
*
- * Return value: the font map of @context
+ * Return value: (transfer none): the font map of @context
*
* Since: 2.10
*/
/**
* gtk_print_context_create_pango_context:
- * @context: a #GtkPrintContext
+ * @context: a #GtkPrintContext
*
* Creates a new #PangoContext that can be used with the
* #GtkPrintContext.
*
- * Return value: a new Pango context for @context
+ * Return value: (transfer full): a new Pango context for @context
*
* Since: 2.10
*/
* Creates a new #PangoLayout that is suitable for use
* with the #GtkPrintContext.
*
- * Return value: a new Pango layout for @context
+ * Return value: (transfer full): a new Pango layout for @context
*
* Since: 2.10
*/
* gtk_print_operation_get_default_page_setup:
* @op: a #GtkPrintOperation
*
- * Returns the default page setup, see
+ * Returns the default page setup, see
* gtk_print_operation_set_default_page_setup().
*
- * Returns: the default page setup
+ * Returns: (transfer none): the default page setup
*
* Since: 2.10
*/
/**
* gtk_print_operation_get_print_settings:
* @op: a #GtkPrintOperation
- *
- * Returns the current print settings.
*
- * Note that the return value is %NULL until either
- * gtk_print_operation_set_print_settings() or
+ * Returns the current print settings.
+ *
+ * Note that the return value is %NULL until either
+ * gtk_print_operation_set_print_settings() or
* gtk_print_operation_run() have been called.
- *
- * Return value: the current print settings of @op.
- *
+ *
+ * Return value: (transfer none): the current print settings of @op.
+ *
* Since: 2.10
**/
GtkPrintSettings *
/**
* gtk_print_settings_copy:
* @other: a #GtkPrintSettings
- *
+ *
* Copies a #GtkPrintSettings object.
- *
- * Return value: a newly allocated copy of @other
+ *
+ * Return value: (transfer full): a newly allocated copy of @other
*
* Since: 2.10
*/
/**
* gtk_print_settings_foreach:
* @settings: a #GtkPrintSettings
- * @func: (scope call) the function to call
+ * @func: (scope call): the function to call
* @user_data: user data for @func
*
* Calls @func for each key-value pair of @settings.
gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_PRINT_PAGES, str);
}
-
+
/**
* gtk_print_settings_get_page_ranges:
* @settings: a #GtkPrintSettings
* @num_ranges: return location for the length of the returned array
- *
+ *
* Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
- *
- * Return value: an array of #GtkPageRange<!-- -->s. Use g_free()
- * to free the array when it is no longer needed.
+ *
+ * Return value: (transfer full): an array of #GtkPageRange<!-- -->s.
+ * Use g_free() to free the array when it is no longer needed.
*
* Since: 2.10
*/
* Creates a new #GtkRadioButton. To be of any practical value, a widget should
* then be packed into the radio button.
*
- * Returns: a new radio button.
+ * Returns: a new radio button
*/
GtkWidget*
gtk_radio_button_new (GSList *group)
*
* Creates a new #GtkRadioButton with a text label.
*
- * Returns: a new radio button.
+ * Returns: (transfer full): a new radio button.
*/
GtkWidget*
gtk_radio_button_new_with_label (GSList *group,
* @group: the radio button group
* @label: the text of the button, with an underscore in front of the
* mnemonic character
- * @returns: a new #GtkRadioButton
*
- * Creates a new #GtkRadioButton containing a label, adding it to the same
- * group as @group. The label will be created using
- * gtk_label_new_with_mnemonic(), so underscores in @label indicate the
+ * Creates a new #GtkRadioButton containing a label, adding it to the same
+ * group as @group. The label will be created using
+ * gtk_label_new_with_mnemonic(), so underscores in @label indicate the
* mnemonic for the button.
- **/
+ *
+ * Returns: (transfer full): a new #GtkRadioButton
+ */
GtkWidget*
gtk_radio_button_new_with_mnemonic (GSList *group,
const gchar *label)
* gtk_radio_button_new_from_widget:
* @radio_group_member: an existing #GtkRadioButton.
*
- * Creates a new #GtkRadioButton, adding it to the same group as @radio_group_member.
- * As with gtk_radio_button_new(), a widget should be packed into the radio button.
+ * Creates a new #GtkRadioButton, adding it to the same group as
+ * @radio_group_member. As with gtk_radio_button_new(), a widget
+ * should be packed into the radio button.
*
- * Returns: a new radio button.
+ * Returns: (transfer full): a new radio button.
*/
GtkWidget*
gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member)
* @radio_group_member: widget to get radio group from or %NULL
* @label: a text string to display next to the radio button.
*
- * Creates a new #GtkRadioButton with a text label, adding it to the same group
- * as @radio_group_member.
+ * Creates a new #GtkRadioButton with a text label, adding it to
+ * the same group as @radio_group_member.
*
- * Returns: a new radio button.
+ * Returns: (transfer none): a new radio button.
*/
GtkWidget*
gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member,
* @radio_group_member: (allow-none): widget to get radio group from or %NULL
* @label: the text of the button, with an underscore in front of the
* mnemonic character
- * @returns: a new #GtkRadioButton
*
* Creates a new #GtkRadioButton containing a label. The label
* will be created using gtk_label_new_with_mnemonic(), so underscores
* in @label indicate the mnemonic for the button.
+ *
+ * Returns: (transfer full): a new #GtkRadioButton
**/
GtkWidget*
gtk_radio_button_new_with_mnemonic_from_widget (GtkRadioButton *radio_group_member,
/**
* gtk_radio_menu_item_new_from_widget:
* @group: An existing #GtkRadioMenuItem
- *
+ *
* Creates a new #GtkRadioMenuItem adding it to the same group as @group.
- *
- * Return value: The new #GtkRadioMenuItem
- *
+ *
+ * Return value: (transfer full): The new #GtkRadioMenuItem
+ *
* Since: 2.4
**/
GtkWidget *
*
* The new #GtkRadioMenuItem is added to the same group as @group.
*
- * Return value: The new #GtkRadioMenuItem
- *
+ * Return value: (transfer full): The new #GtkRadioMenuItem
+ *
* Since: 2.4
**/
GtkWidget *
/**
* gtk_radio_menu_item_new_with_label_from_widget:
- * @group: an existing #GtkRadioMenuItem
+ * @group: an existing #GtkRadioMenuItem
* @label: the text for the label
*
* Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
* The new #GtkRadioMenuItem is added to the same group as @group.
*
- * Return value: The new #GtkRadioMenuItem
- *
+ * Return value: (transfer full): The new #GtkRadioMenuItem
+ *
* Since: 2.4
**/
GtkWidget *
return gtk_radio_menu_item_new_with_label (list, label);
}
+/**
+ * gtk_radio_menu_item_get_group:
+ * @radio_menu_item: a #GtkRadioMenuItem
+ *
+ * Returns the group to which the radio menu item belongs, as a #GList of
+ * #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
+ *
+ * Returns: (transfer none): the group of @radio_menu_item
+ */
GSList*
gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item)
{
/**
* gtk_radio_tool_button_new_from_widget:
* @group: An existing #GtkRadioToolButton
- *
+ *
* Creates a new #GtkRadioToolButton adding it to the same group as @gruup
- *
- * Return value: The new #GtkRadioToolButton
- *
+ *
+ * Return value: (transfer full): The new #GtkRadioToolButton
+ *
* Since: 2.4
**/
GtkToolItem *
/**
* gtk_radio_tool_button_new_with_stock_from_widget:
* @group: An existing #GtkRadioToolButton.
- * @stock_id: the name of a stock item
- *
+ * @stock_id: the name of a stock item
+ *
* Creates a new #GtkRadioToolButton adding it to the same group as @group.
* The new #GtkRadioToolButton will contain an icon and label from the
* stock item indicated by @stock_id.
- *
- * Return value: A new #GtkRadioToolButton
- *
+ *
+ * Return value: (transfer full): A new #GtkRadioToolButton
+ *
* Since: 2.4
**/
GtkToolItem *
* @button: a #GtkRadioToolButton
*
* Returns the radio button group @button belongs to.
- *
- * Return value: The group @button belongs to.
- *
+ *
+ * Return value: (transfer none): The group @button belongs to.
+ *
* Since: 2.4
- **/
+ */
GSList *
gtk_radio_tool_button_get_group (GtkRadioToolButton *button)
{
* The return value does not have a reference added, so should not
* be unreferenced.
*
- * Return value: a #GtkAdjustment
+ * Return value: (transfer none): a #GtkAdjustment
**/
GtkAdjustment*
gtk_range_get_adjustment (GtkRange *range)
/**
* gtk_range_get_fill_level:
- * @range : A #GtkRange
+ * @range: A #GtkRange
*
* Gets the current position of the fill level indicator.
*
/**
* gtk_rc_get_default_files:
- *
+ *
* Retrieves the current list of RC files that will be parsed
* at the end of gtk_init().
- *
- * Return value: A %NULL-terminated array of filenames. This memory
- * is owned by GTK+ and must not be freed by the application.
- * If you want to store this information, you should make a copy.
+ *
+ * Return value: (transfer none): A %NULL-terminated array of filenames.
+ * This memory is owned by GTK+ and must not be freed by the application.
+ * If you want to store this information, you should make a copy.
**/
gchar **
gtk_rc_get_default_files (void)
/**
* gtk_rc_style_copy:
* @orig: the style to copy
- *
+ *
* Makes a copy of the specified #GtkRcStyle. This function
* will correctly copy an RC style that is a member of a class
* derived from #GtkRcStyle.
- *
- * Return value: the resulting #GtkRcStyle
+ *
+ * Return value: (transfer full): the resulting #GtkRcStyle
**/
GtkRcStyle *
gtk_rc_style_copy (GtkRcStyle *orig)
/**
* gtk_rc_get_style_by_paths:
* @settings: a #GtkSettings object
- * @widget_path: (allow-none): the widget path to use when looking up the style, or %NULL
- * if no matching against the widget path should be done
- * @class_path: (allow-none): the class path to use when looking up the style, or %NULL
- * if no matching against the class path should be done.
+ * @widget_path: (allow-none): the widget path to use when looking up the
+ * style, or %NULL if no matching against the widget path should be done
+ * @class_path: (allow-none): the class path to use when looking up the style,
+ * or %NULL if no matching against the class path should be done.
* @type: a type that will be used along with parent types of this type
- * when matching against class styles, or #G_TYPE_NONE
+ * when matching against class styles, or #G_TYPE_NONE
*
* Creates up a #GtkStyle from styles defined in a RC file by providing
* the raw components used in matching. This function may be useful
* G_OBJECT_TYPE (widget));
* ]|
*
- * Return value: A style created by matching with the supplied paths,
- * or %NULL if nothing matching was specified and the default style should
- * be used. The returned value is owned by GTK+ as part of an internal cache,
- * so you must call g_object_ref() on the returned value if you want to
- * keep a reference to it.
+ * Return value: (transfer none): A style created by matching with the
+ * supplied paths, or %NULL if nothing matching was specified and the
+ * default style should be used. The returned value is owned by GTK+
+ * as part of an internal cache, so you must call g_object_ref() on
+ * the returned value if you want to keep a reference to it.
**/
GtkStyle *
gtk_rc_get_style_by_paths (GtkSettings *settings,
*
* Since the returned array is %NULL terminated, @length may be %NULL.
*
- * Return value: A newly allocated, %NULL terminated array of strings. Use
- * g_strfreev() to free it.
+ * Return value: (transfer full): A newly allocated, %NULL-terminated array
+ * of strings. Use g_strfreev() to free it.
*
* Since: 2.10
*/
* Gets the #GtkRecentFilter object currently used by @chooser to affect
* the display of the recently used resources.
*
- * Return value: a #GtkRecentFilter object.
+ * Return value: (transfer none): a #GtkRecentFilter object.
*
* Since: 2.10
*/
GSList * (* list_filters) (GtkRecentChooser *chooser);
void (* set_sort_func) (GtkRecentChooser *chooser,
GtkRecentSortFunc sort_func,
- gpointer data,
- GDestroyNotify destroy);
+ gpointer sort_data,
+ GDestroyNotify data_destroy);
/*
* Signals
*
* Retrieves the list of applications that have registered this resource.
*
- * Return value: (array length=length zero-terminated=1): a newly allocated
- * %NULL-terminated array of strings. Use g_strfreev() to free it.
+ * Return value: (array length=length zero-terminated=1) (transfer full):
+ * a newly allocated %NULL-terminated array of strings.
+ * Use g_strfreev() to free it.
*
* Since: 2.10
*/
*
* Retrieves the icon of size @size associated to the resource MIME type.
*
- * Return value: a #GdkPixbuf containing the icon, or %NULL. Use
- * g_object_unref() when finished using the icon.
+ * Return value: (transfer full): a #GdkPixbuf containing the icon,
+ * or %NULL. Use g_object_unref() when finished using the icon.
*
* Since: 2.10
*/
* array of returned group names will be %NULL terminated, so length might
* optionally be %NULL.
*
- * Return value: (array length=length zero-terminated=1): a newly allocated
- * %NULL terminated array of strings. Use g_strfreev() to free it.
+ * Return value: (array length=length zero-terminated=1) (transfer full):
+ * a newly allocated %NULL terminated array of strings.
+ * Use g_strfreev() to free it.
*
* Since: 2.10
*/
* gtk_scale_get_layout:
* @scale: A #GtkScale
*
- * Gets the #PangoLayout used to display the scale.
- * The returned object is owned by the scale so does
- * not need to be freed by the caller.
+ * Gets the #PangoLayout used to display the scale. The returned
+ * object is owned by the scale so does not need to be freed by
+ * the caller.
+ *
+ * Return value: (transfer none): the #PangoLayout for this scale,
+ * or %NULL if the #GtkScale:draw-value property is %FALSE.
*
- * Return value: the #PangoLayout for this scale, or %NULL
- * if the #GtkScale:draw-value property is %FALSE.
- *
* Since: 2.4
*/
PangoLayout *
* Gets the #GtkAdjustment associated with the #GtkScaleButton's scale.
* See gtk_range_get_adjustment() for details.
*
- * Returns: the adjustment associated with the scale
+ * Returns: (transfer none): the adjustment associated with the scale
*
* Since: 2.12
*/
*
* Retrieves the plus button of the #GtkScaleButton.
*
- * Returns: the plus button of the #GtkScaleButton.
+ * Returns: (transfer none): the plus button of the #GtkScaleButton
*
* Since: 2.14
*/
*
* Retrieves the minus button of the #GtkScaleButton.
*
- * Returns: the minus button of the #GtkScaleButton.
+ * Returns: (transfer none): the minus button of the #GtkScaleButton
*
* Since: 2.14
*/
*
* Retrieves the popup of the #GtkScaleButton.
*
- * Returns: the popup of the #GtkScaleButton
+ * Returns: (transfer none): the popup of the #GtkScaleButton
*
* Since: 2.14
*/
* horizontal scrollbar to the child widget's horizontal scroll
* functionality.
*
- * Returns: the horizontal #GtkAdjustment
+ * Returns: (transfer none): the horizontal #GtkAdjustment
*/
GtkAdjustment*
gtk_scrolled_window_get_hadjustment (GtkScrolledWindow *scrolled_window)
* @scrolled_window: a #GtkScrolledWindow
*
* Returns the vertical scrollbar's adjustment, used to connect the
- * vertical scrollbar to the child widget's vertical scroll
- * functionality.
+ * vertical scrollbar to the child widget's vertical scroll functionality.
*
- * Returns: the vertical #GtkAdjustment
+ * Returns: (transfer none): the vertical #GtkAdjustment
*/
GtkAdjustment*
gtk_scrolled_window_get_vadjustment (GtkScrolledWindow *scrolled_window)
/**
* gtk_scrolled_window_get_hscrollbar:
* @scrolled_window: a #GtkScrolledWindow
- *
+ *
* Returns the horizontal scrollbar of @scrolled_window.
*
- * Returns: the horizontal scrollbar of the scrolled window, or
- * %NULL if it does not have one.
+ * Returns: (transfer none): the horizontal scrollbar of the scrolled window,
+ * or %NULL if it does not have one.
*
* Since: 2.8
*/
*
* Returns the vertical scrollbar of @scrolled_window.
*
- * Returns: the vertical scrollbar of the scrolled window, or
- * %NULL if it does not have one.
+ * Returns: (transfer none): the vertical scrollbar of the scrolled window,
+ * or %NULL if it does not have one.
*
* Since: 2.8
*/
*
* Retrieves the display of the selection.
*
- * Returns: the display of the selection.
+ * Returns: (transfer none): the display of the selection.
*
* Since: 2.14
**/
*
* Gets the contents of the selection data as a #GdkPixbuf.
*
- * Return value: if the selection data contained a recognized
+ * Return value: (transfer full): if the selection data contained a recognized
* image type and it could be converted to a #GdkPixbuf, a
* newly allocated pixbuf is returned, otherwise %NULL.
* If the result is non-%NULL it must be freed with g_object_unref().
/**
* gtk_settings_get_for_screen:
- * @screen : a #GdkScreen.
- *
+ * @screen: a #GdkScreen.
+ *
* Gets the #GtkSettings object for @screen, creating it if necessary.
*
- * Return value: a #GtkSettings object.
+ * Return value: (transfer none): a #GtkSettings object.
*
* Since: 2.2
*/
gtk_settings_get_for_screen (GdkScreen *screen)
{
GtkSettings *settings;
-
+
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
+
settings = g_object_get_data (G_OBJECT (screen), "gtk-settings");
if (!settings)
{
* Retrieves the window of the plug. Use this to check if the plug has
* been created inside of the socket.
*
- * Return value: the window of the plug if available, or %NULL
+ * Return value: (transfer none): the window of the plug if available, or %NULL
*
* Since: 2.14
**/
*
* Get the adjustment associated with a #GtkSpinButton
*
- * Return value: the #GtkAdjustment of @spin_button
+ * Return value: (transfer none): the #GtkAdjustment of @spin_button
**/
GtkAdjustment *
gtk_spin_button_get_adjustment (GtkSpinButton *spin_button)
*
* Retrieves the box containing the label widget.
*
- * Returns: a #GtkBox
+ * Returns: (transfer none): a #GtkBox
*
* Since: 2.20
*/
* The caller of this function does not own a reference to the
* returned pixbuf.
*
- * Return value: the displayed pixbuf, or %NULL if the image is empty.
+ * Return value: (transfer none): the displayed pixbuf,
+ * or %NULL if the image is empty.
*
* Since: 2.10
**/
*
* If this function fails, @icon is left unchanged;
*
- * Returns: the displayed icon, or %NULL if the image is empty
+ * Returns: (transfer none): the displayed icon, or %NULL if the image is empty
*
* Since: 2.14
**/
#endif
}
-/**
+/**
* gtk_status_icon_get_screen:
* @status_icon: a #GtkStatusIcon
*
* Returns the #GdkScreen associated with @status_icon.
*
- * Return value: a #GdkScreen.
+ * Return value: (transfer none): a #GdkScreen.
*
* Since: 2.12
*/
{
g_return_val_if_fail (GTK_IS_STATUS_ICON (status_icon), NULL);
-#ifdef GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
return gtk_window_get_screen (GTK_WINDOW (status_icon->priv->tray_icon));
#else
return gdk_screen_get_default ();
*
* Creates a copy of the passed in #GtkStyle object.
*
- * Returns: a copy of @style
+ * Returns: (transfer full): a copy of @style
*/
GtkStyle*
gtk_style_copy (GtkStyle *style)
*
* Attaches a style to a window; this process allocates the
* colors and creates the GC's for the style - it specializes
- * it to a particular visual and colormap. The process may
- * involve the creation of a new style if the style has already
+ * it to a particular visual and colormap. The process may
+ * involve the creation of a new style if the style has already
* been attached to a window with a different style and colormap.
*
- * Since this function may return a new object, you have to use it
- * in the following way:
+ * Since this function may return a new object, you have to use it
+ * in the following way:
* <literal>style = gtk_style_attach (style, window)</literal>
*
* Returns: Either @style, or a newly-created #GtkStyle.
* don't scale.
* @widget: (allow-none): the widget
* @detail: (allow-none): a style detail
- * @returns: a newly-created #GdkPixbuf containing the rendered icon
*
* Renders the icon specified by @source at the given @size
* according to the given parameters and returns the result in a
* pixbuf.
+ *
+ * Return value: (transfer full): a newly-created #GdkPixbuf
+ * containing the rendered icon
*/
GdkPixbuf *
gtk_style_render_icon (GtkStyle *style,
* owned by the buffer; no reference count is returned to
* the caller of gtk_text_buffer_create_child_anchor().
*
- * Return value: the created child anchor
+ * Return value: (transfer none): the created child anchor
**/
GtkTextChildAnchor*
gtk_text_buffer_create_child_anchor (GtkTextBuffer *buffer,
* @first_property_name: (allow-none): name of first property to set, or %NULL
* @Varargs: %NULL-terminated list of property names and values
*
- *
* Creates a tag and adds it to the tag table for @buffer.
* Equivalent to calling gtk_text_tag_new() and then adding the
* tag to the buffer's tag table. The returned tag is owned by
* The @first_property_name argument and subsequent arguments are a list
* of properties to set on the tag, as with g_object_set().
*
- * Return value: a new tag
- **/
+ * Return value: (transfer none): a new tag
+ */
GtkTextTag*
gtk_text_buffer_create_tag (GtkTextBuffer *buffer,
const gchar *tag_name,
* at the cursor
* @default_editable: whether the buffer is editable by default
*
- * Pastes the contents of a clipboard at the insertion point, or at
- * @override_location. (Note: pasting is asynchronous, that is, we'll
- * ask for the paste data and return, and at some point later after
- * the main loop runs, the paste data will be inserted.)
+ * Pastes the contents of a clipboard at the insertion point, or
+ * at @override_location. (Note: pasting is asynchronous, that is,
+ * we'll ask for the paste data and return, and at some point later
+ * after the main loop runs, the paste data will be inserted.)
**/
void
gtk_text_buffer_paste_clipboard (GtkTextBuffer *buffer,
* anchor is returned (with no new reference count added). Otherwise,
* %NULL is returned.
*
- * Return value: the anchor at @iter
+ * Return value: (transfer none): the anchor at @iter
**/
GtkTextChildAnchor*
gtk_text_iter_get_child_anchor (const GtkTextIter *iter)
}
/**
- * gtk_text_iter_backward_word_starts
+ * gtk_text_iter_backward_word_starts:
* @iter: a #GtkTextIter
* @count: number of times to move
*
}
/**
- * gtk_text_iter_backward_visible_word_starts
+ * gtk_text_iter_backward_visible_word_starts:
* @iter: a #GtkTextIter
* @count: number of times to move
*
/**
* gtk_text_iter_forward_find_char:
* @iter: a #GtkTextIter
- * @pred: a function to be called on each character
+ * @pred: (scope call): a function to be called on each character
* @user_data: user data for @pred
* @limit: (allow-none): search limit, or %NULL for none
*
/**
* gtk_text_iter_backward_find_char:
* @iter: a #GtkTextIter
- * @pred: function to be called on each character
+ * @pred: (scope call): function to be called on each character
* @user_data: user data for @pred
* @limit: (allow-none): search limit, or %NULL for none
*
/**
* gtk_text_tag_table_foreach:
* @table: a #GtkTextTagTable
- * @func: a function to call on each tag
+ * @func: (scope call): a function to call on each tag
* @data: user data
*
* Calls @func on each tag in @table, with user data @data.
*
* Returns the @n<!-- -->'th item on @toolbar, or %NULL if the
* toolbar does not contain an @n<!-- -->'th item.
- *
- * Return value: The @n<!-- -->'th #GtkToolItem on @toolbar, or %NULL if there
- * isn't an @n<!-- -->'th item.
- *
+ *
+ * Return value: (transfer none): The @n<!-- -->'th #GtkToolItem on @toolbar,
+ * or %NULL if there isn't an @n<!-- -->'th item.
+ *
* Since: 2.4
**/
GtkToolItem *
/**
* gtk_tool_button_get_label_widget:
* @button: a #GtkToolButton
- *
- * Returns the widget used as label on @button. See
- * gtk_tool_button_set_label_widget().
- *
- * Return value: The widget used as label on @button, or %NULL.
- *
+ *
+ * Returns the widget used as label on @button.
+ * See gtk_tool_button_set_label_widget().
+ *
+ * Return value: (transfer none): The widget used as label
+ * on @button, or %NULL.
+ *
* Since: 2.4
**/
GtkWidget *
/**
* gtk_tool_button_get_icon_widget:
* @button: a #GtkToolButton
- *
- * Return the widget used as icon widget on @button. See
- * gtk_tool_button_set_icon_widget().
- *
- * Return value: The widget used as icon on @button, or %NULL.
- *
+ *
+ * Return the widget used as icon widget on @button.
+ * See gtk_tool_button_set_icon_widget().
+ *
+ * Return value: (transfer none): The widget used as icon
+ * on @button, or %NULL.
+ *
* Since: 2.4
**/
GtkWidget *
* gtk_tool_item_get_text_size_group:
* @tool_item: a #GtkToolItem
*
- * Returns the size group used for labels in @tool_item. Custom subclasses of
- * #GtkToolItem should call this function and use the size group for labels.
+ * Returns the size group used for labels in @tool_item.
+ * Custom subclasses of #GtkToolItem should call this function
+ * and use the size group for labels.
*
- * Return value: a #GtkSizeGroup
+ * Return value: (transfer none): a #GtkSizeGroup
*
* Since: 2.20
*/
/**
* gtk_tool_item_get_proxy_menu_item:
- * @tool_item: a #GtkToolItem
+ * @tool_item: a #GtkToolItem
* @menu_item_id: a string used to identify the menu item
- *
+ *
* If @menu_item_id matches the string passed to
* gtk_tool_item_set_proxy_menu_item() return the corresponding #GtkMenuItem.
*
- * Custom subclasses of #GtkToolItem should use this function to update
- * their menu item when the #GtkToolItem changes. That the
- * @menu_item_id<!-- -->s must match ensures that a #GtkToolItem will not
- * inadvertently change a menu item that they did not create.
- *
- * Return value: The #GtkMenuItem passed to
- * gtk_tool_item_set_proxy_menu_item(), if the @menu_item_id<!-- -->s match.
- *
+ * Custom subclasses of #GtkToolItem should use this function to
+ * update their menu item when the #GtkToolItem changes. That the
+ * @menu_item_id<!-- -->s must match ensures that a #GtkToolItem
+ * will not inadvertently change a menu item that they did not create.
+ *
+ * Return value: (transfer none): The #GtkMenuItem passed to
+ * gtk_tool_item_set_proxy_menu_item(), if the @menu_item_id<!-- -->s
+ * match.
+ *
* Since: 2.4
**/
GtkWidget *
* Gets the label widget of @group.
* See gtk_tool_item_group_set_label_widget().
*
- * Returns: the label widget of @group
+ * Returns: (transfer none): the label widget of @group
*
* Since: 2.20
*/
*
* Gets the tool item at @index in group.
*
- * Returns: the #GtkToolItem at index
+ * Returns: (transfer none): the #GtkToolItem at index
*
* Since: 2.20
*/
*
* Gets the tool item at position (x, y).
*
- * Returns: the #GtkToolItem at position (x, y)
+ * Returns: (transfer none): the #GtkToolItem at position (x, y)
*
* Since: 2.20
*/
/**
* gtk_tree_model_foreach:
* @model: A #GtkTreeModel
- * @func: A function to be called on each row
+ * @func: (scope call): A function to be called on each row
* @user_data: User data to passed to func.
- *
- * Calls func on each node in model in a depth-first fashion.
- * If @func returns %TRUE, then the tree ceases to be walked, and
+ *
+ * Calls func on each node in model in a depth-first fashion.
+ * If @func returns %TRUE, then the tree ceases to be walked, and
* gtk_tree_model_foreach() returns.
**/
void
*
* Returns the model that the row reference is monitoring.
*
- * Return value: the model
+ * Return value: (transfer none): the model
*
* Since: 2.8
*/
* Creates a new #GtkTreeModel, with @child_model as the child_model
* and @root as the virtual root.
*
- * Return value: A new #GtkTreeModel.
+ * Return value: (transfer full): A new #GtkTreeModel.
*
* Since: 2.4
*/
*
* Returns a pointer to the child model of @filter.
*
- * Return value: A pointer to a #GtkTreeModel.
+ * Return value: (transfer none): A pointer to a #GtkTreeModel.
*
* Since: 2.4
*/
*
* Creates a new #GtkTreeModel, with @child_model as the child model.
*
- * Return value: A new #GtkTreeModel.
+ * Return value: (transfer full): A new #GtkTreeModel.
*/
GtkTreeModel *
-gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model)
+gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model)
{
GtkTreeModel *retval;
*
* Returns the model the #GtkTreeModelSort is sorting.
*
- * Return value: the "child model" being sorted
+ * Return value: (transfer none): the "child model" being sorted
**/
GtkTreeModel *
gtk_tree_model_sort_get_model (GtkTreeModelSort *tree_model)
GtkSortType order);
void (* set_sort_func) (GtkTreeSortable *sortable,
gint sort_column_id,
- GtkTreeIterCompareFunc func,
- gpointer data,
+ GtkTreeIterCompareFunc sort_func,
+ gpointer user_data,
GDestroyNotify destroy);
void (* set_default_sort_func) (GtkTreeSortable *sortable,
- GtkTreeIterCompareFunc func,
- gpointer data,
+ GtkTreeIterCompareFunc sort_func,
+ gpointer user_data,
GDestroyNotify destroy);
gboolean (* has_default_sort_func) (GtkTreeSortable *sortable);
};
*
* Gets the #GtkAdjustment currently being used for the horizontal aspect.
*
- * Return value: A #GtkAdjustment object, or %NULL if none is currently being
- * used.
+ * Return value: (transfer none): A #GtkAdjustment object, or %NULL
+ * if none is currently being used.
**/
GtkAdjustment *
gtk_tree_view_get_hadjustment (GtkTreeView *tree_view)
*
* Gets the #GtkAdjustment currently being used for the vertical aspect.
*
- * Return value: A #GtkAdjustment object, or %NULL if none is currently being
- * used.
+ * Return value: (transfer none): A #GtkAdjustment object, or %NULL
+ * if none is currently being used.
**/
GtkAdjustment *
gtk_tree_view_get_vadjustment (GtkTreeView *tree_view)
*
* Gets the #GtkTreeViewColumn at the given position in the #tree_view.
*
- * Return value: The #GtkTreeViewColumn, or %NULL if the position is outside the
- * range of columns.
+ * Return value: (transfer none): The #GtkTreeViewColumn, or %NULL if the
+ * position is outside the range of columns.
**/
GtkTreeViewColumn *
gtk_tree_view_get_column (GtkTreeView *tree_view,
* gtk_tree_view_get_expander_column:
* @tree_view: A #GtkTreeView
*
- * Returns the column that is the current expander column. This
- * column has the expander arrow drawn next to it.
+ * Returns the column that is the current expander column.
+ * This column has the expander arrow drawn next to it.
*
- * Return value: The expander column.
+ * Return value: (transfer none): The expander column.
**/
GtkTreeViewColumn *
gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
/**
* gtk_tree_view_map_expanded_rows:
* @tree_view: A #GtkTreeView
- * @func: A function to be called
+ * @func: (scope call): A function to be called
* @data: User data to be passed to the function.
*
* Calls @func on all expanded rows.
/**
* gtk_tree_view_get_bin_window:
* @tree_view: A #GtkTreeView
- *
- * Returns the window that @tree_view renders to. This is used primarily to
- * compare to <literal>event->window</literal> to confirm that the event on
- * @tree_view is on the right window.
- *
- * Return value: A #GdkWindow, or %NULL when @tree_view hasn't been realized yet
+ *
+ * Returns the window that @tree_view renders to.
+ * This is used primarily to compare to <literal>event->window</literal>
+ * to confirm that the event on @tree_view is on the right window.
+ *
+ * Return value: (transfer none): A #GdkWindow, or %NULL when @tree_view
+ * hasn't been realized yet
**/
GdkWindow *
gtk_tree_view_get_bin_window (GtkTreeView *tree_view)
* @tree_view: a #GtkTreeView
* @path: a #GtkTreePath in @tree_view
*
- * Creates a #GdkPixmap representation of the row at @path.
+ * Creates a #GdkPixmap representation of the row at @path.
* This image is used for a drag icon.
*
- * Return value: a newly-allocated pixmap of the drag icon.
+ * Return value: (transfer none): a newly-allocated pixmap of the drag icon.
**/
GdkPixmap *
gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
* entry for @tree_view. In case the built-in entry is being used, %NULL
* will be returned.
*
- * Return value: the entry currently in use as search entry.
+ * Return value: (transfer none): the entry currently in use as search entry.
*
* Since: 2.10
*/
/**
* gtk_tree_view_column_get_widget:
* @tree_column: A #GtkTreeViewColumn.
- *
- * Returns the #GtkWidget in the button on the column header. If a custom
- * widget has not been set then %NULL is returned.
- *
- * Return value: The #GtkWidget in the column header, or %NULL
+ *
+ * Returns the #GtkWidget in the button on the column header.
+ * If a custom widget has not been set then %NULL is returned.
+ *
+ * Return value: (transfer none): The #GtkWidget in the column
+ * header, or %NULL
**/
GtkWidget *
gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column)
* gtk_tree_view_column_get_tree_view:
* @tree_column: A #GtkTreeViewColumn
*
- * Returns the #GtkTreeView wherein @tree_column has been inserted. If
- * @column is currently not inserted in any tree view, %NULL is
+ * Returns the #GtkTreeView wherein @tree_column has been inserted.
+ * If @column is currently not inserted in any tree view, %NULL is
* returned.
*
- * Return value: The tree view wherein @column has been inserted if any,
- * %NULL otherwise.
+ * Return value: (transfer none): The tree view wherein @column has
+ * been inserted if any, %NULL otherwise.
*
* Since: 2.12
*/
const gchar *path);
static GtkAction * gtk_ui_manager_real_get_action (GtkUIManager *manager,
const gchar *path);
-static void queue_update (GtkUIManager *self);
-static void dirty_all_nodes (GtkUIManager *self);
+static void queue_update (GtkUIManager *manager);
+static void dirty_all_nodes (GtkUIManager *manager);
static void mark_node_dirty (GNode *node);
-static GNode * get_child_node (GtkUIManager *self,
+static GNode * get_child_node (GtkUIManager *manager,
GNode *parent,
GNode *sibling,
const gchar *childname,
NodeType node_type,
gboolean create,
gboolean top);
-static GNode * get_node (GtkUIManager *self,
+static GNode * get_node (GtkUIManager *manager,
const gchar *path,
NodeType node_type,
gboolean create);
/**
* GtkUIManager::add-widget:
- * @merge: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @widget: the added widget
*
* The ::add-widget signal is emitted for each generated menubar and toolbar.
/**
* GtkUIManager::actions-changed:
- * @merge: a #GtkUIManager
+ * @manager: a #GtkUIManager
*
* The ::actions-changed signal is emitted whenever the set of actions
* changes.
/**
* GtkUIManager::connect-proxy:
- * @uimanager: the ui manager
+ * @manager: the ui manager
* @action: the action
* @proxy: the proxy
*
/**
* GtkUIManager::disconnect-proxy:
- * @uimanager: the ui manager
+ * @manager: the ui manager
* @action: the action
* @proxy: the proxy
*
/**
* GtkUIManager::pre-activate:
- * @uimanager: the ui manager
+ * @manager: the ui manager
* @action: the action
*
* The ::pre-activate signal is emitted just before the @action
/**
* GtkUIManager::post-activate:
- * @uimanager: the ui manager
+ * @manager: the ui manager
* @action: the action
*
* The ::post-activate signal is emitted just after the @action
static void
-gtk_ui_manager_init (GtkUIManager *self)
+gtk_ui_manager_init (GtkUIManager *manager)
{
guint merge_id;
GNode *node;
- self->private_data = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GTK_TYPE_UI_MANAGER,
- GtkUIManagerPrivate);
+ manager->private_data = G_TYPE_INSTANCE_GET_PRIVATE (manager,
+ GTK_TYPE_UI_MANAGER,
+ GtkUIManagerPrivate);
- self->private_data->accel_group = gtk_accel_group_new ();
+ manager->private_data->accel_group = gtk_accel_group_new ();
- self->private_data->root_node = NULL;
- self->private_data->action_groups = NULL;
+ manager->private_data->root_node = NULL;
+ manager->private_data->action_groups = NULL;
- self->private_data->last_merge_id = 0;
- self->private_data->add_tearoffs = FALSE;
+ manager->private_data->last_merge_id = 0;
+ manager->private_data->add_tearoffs = FALSE;
- merge_id = gtk_ui_manager_new_merge_id (self);
- node = get_child_node (self, NULL, NULL, "ui", 2,
+ merge_id = gtk_ui_manager_new_merge_id (manager);
+ node = get_child_node (manager, NULL, NULL, "ui", 2,
NODE_TYPE_ROOT, TRUE, FALSE);
node_prepend_ui_reference (node, merge_id, 0);
}
static void
gtk_ui_manager_finalize (GObject *object)
{
- GtkUIManager *self = GTK_UI_MANAGER (object);
+ GtkUIManager *manager = GTK_UI_MANAGER (object);
- if (self->private_data->update_tag != 0)
+ if (manager->private_data->update_tag != 0)
{
- g_source_remove (self->private_data->update_tag);
- self->private_data->update_tag = 0;
+ g_source_remove (manager->private_data->update_tag);
+ manager->private_data->update_tag = 0;
}
- g_node_traverse (self->private_data->root_node,
+ g_node_traverse (manager->private_data->root_node,
G_POST_ORDER, G_TRAVERSE_ALL, -1,
(GNodeTraverseFunc)free_node, NULL);
- g_node_destroy (self->private_data->root_node);
- self->private_data->root_node = NULL;
+ g_node_destroy (manager->private_data->root_node);
+ manager->private_data->root_node = NULL;
- g_list_foreach (self->private_data->action_groups,
+ g_list_foreach (manager->private_data->action_groups,
(GFunc) g_object_unref, NULL);
- g_list_free (self->private_data->action_groups);
- self->private_data->action_groups = NULL;
+ g_list_free (manager->private_data->action_groups);
+ manager->private_data->action_groups = NULL;
- g_object_unref (self->private_data->accel_group);
- self->private_data->accel_group = NULL;
+ g_object_unref (manager->private_data->accel_group);
+ manager->private_data->accel_group = NULL;
G_OBJECT_CLASS (gtk_ui_manager_parent_class)->finalize (object);
}
GObject *child,
const gchar *type)
{
- GtkUIManager *self = GTK_UI_MANAGER (buildable);
+ GtkUIManager *manager = GTK_UI_MANAGER (buildable);
guint pos;
g_return_if_fail (GTK_IS_ACTION_GROUP (child));
- pos = g_list_length (self->private_data->action_groups);
+ pos = g_list_length (manager->private_data->action_groups);
g_object_ref (child);
- gtk_ui_manager_insert_action_group (self,
+ gtk_ui_manager_insert_action_group (manager,
GTK_ACTION_GROUP (child),
pos);
}
const GValue *value,
GParamSpec *pspec)
{
- GtkUIManager *self = GTK_UI_MANAGER (object);
+ GtkUIManager *manager = GTK_UI_MANAGER (object);
switch (prop_id)
{
case PROP_ADD_TEAROFFS:
- gtk_ui_manager_set_add_tearoffs (self, g_value_get_boolean (value));
+ gtk_ui_manager_set_add_tearoffs (manager, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
GValue *value,
GParamSpec *pspec)
{
- GtkUIManager *self = GTK_UI_MANAGER (object);
+ GtkUIManager *manager = GTK_UI_MANAGER (object);
switch (prop_id)
{
case PROP_ADD_TEAROFFS:
- g_value_set_boolean (value, self->private_data->add_tearoffs);
+ g_value_set_boolean (value, manager->private_data->add_tearoffs);
break;
case PROP_UI:
- g_value_take_string (value, gtk_ui_manager_get_ui (self));
+ g_value_take_string (value, gtk_ui_manager_get_ui (manager));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
static GtkWidget *
-gtk_ui_manager_real_get_widget (GtkUIManager *self,
+gtk_ui_manager_real_get_widget (GtkUIManager *manager,
const gchar *path)
{
GNode *node;
/* ensure that there are no pending updates before we get the
* widget */
- gtk_ui_manager_ensure_update (self);
+ gtk_ui_manager_ensure_update (manager);
- node = get_node (self, path, NODE_TYPE_UNDECIDED, FALSE);
+ node = get_node (manager, path, NODE_TYPE_UNDECIDED, FALSE);
if (node == NULL)
return NULL;
}
static GtkAction *
-gtk_ui_manager_real_get_action (GtkUIManager *self,
+gtk_ui_manager_real_get_action (GtkUIManager *manager,
const gchar *path)
{
GNode *node;
/* ensure that there are no pending updates before we get
* the action */
- gtk_ui_manager_ensure_update (self);
+ gtk_ui_manager_ensure_update (manager);
- node = get_node (self, path, NODE_TYPE_UNDECIDED, FALSE);
+ node = get_node (manager, path, NODE_TYPE_UNDECIDED, FALSE);
if (node == NULL)
return NULL;
/**
* gtk_ui_manager_get_add_tearoffs:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
*
* Returns whether menus generated by this #GtkUIManager
* will have tearoff menu items.
* Since: 2.4
**/
gboolean
-gtk_ui_manager_get_add_tearoffs (GtkUIManager *self)
+gtk_ui_manager_get_add_tearoffs (GtkUIManager *manager)
{
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), FALSE);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), FALSE);
- return self->private_data->add_tearoffs;
+ return manager->private_data->add_tearoffs;
}
/**
* gtk_ui_manager_set_add_tearoffs:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @add_tearoffs: whether tearoff menu items are added
*
* Sets the "add_tearoffs" property, which controls whether menus
* Since: 2.4
**/
void
-gtk_ui_manager_set_add_tearoffs (GtkUIManager *self,
+gtk_ui_manager_set_add_tearoffs (GtkUIManager *manager,
gboolean add_tearoffs)
{
- g_return_if_fail (GTK_IS_UI_MANAGER (self));
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
add_tearoffs = add_tearoffs != FALSE;
- if (add_tearoffs != self->private_data->add_tearoffs)
+ if (add_tearoffs != manager->private_data->add_tearoffs)
{
- self->private_data->add_tearoffs = add_tearoffs;
+ manager->private_data->add_tearoffs = add_tearoffs;
- dirty_all_nodes (self);
+ dirty_all_nodes (manager);
- g_object_notify (G_OBJECT (self), "add-tearoffs");
+ g_object_notify (G_OBJECT (manager), "add-tearoffs");
}
}
cb_proxy_connect_proxy (GtkActionGroup *group,
GtkAction *action,
GtkWidget *proxy,
- GtkUIManager *self)
+ GtkUIManager *manager)
{
- g_signal_emit (self, ui_manager_signals[CONNECT_PROXY], 0, action, proxy);
+ g_signal_emit (manager, ui_manager_signals[CONNECT_PROXY], 0, action, proxy);
}
static void
cb_proxy_disconnect_proxy (GtkActionGroup *group,
GtkAction *action,
GtkWidget *proxy,
- GtkUIManager *self)
+ GtkUIManager *manager)
{
- g_signal_emit (self, ui_manager_signals[DISCONNECT_PROXY], 0, action, proxy);
+ g_signal_emit (manager, ui_manager_signals[DISCONNECT_PROXY], 0, action, proxy);
}
static void
cb_proxy_pre_activate (GtkActionGroup *group,
GtkAction *action,
- GtkUIManager *self)
+ GtkUIManager *manager)
{
- g_signal_emit (self, ui_manager_signals[PRE_ACTIVATE], 0, action);
+ g_signal_emit (manager, ui_manager_signals[PRE_ACTIVATE], 0, action);
}
static void
cb_proxy_post_activate (GtkActionGroup *group,
GtkAction *action,
- GtkUIManager *self)
+ GtkUIManager *manager)
{
- g_signal_emit (self, ui_manager_signals[POST_ACTIVATE], 0, action);
+ g_signal_emit (manager, ui_manager_signals[POST_ACTIVATE], 0, action);
}
/**
* gtk_ui_manager_insert_action_group:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
* @action_group: the action group to be inserted
* @pos: the position at which the group will be inserted.
*
* Inserts an action group into the list of action groups associated
- * with @self. Actions in earlier groups hide actions with the same
+ * with @manager. Actions in earlier groups hide actions with the same
* name in later groups.
*
* Since: 2.4
**/
void
-gtk_ui_manager_insert_action_group (GtkUIManager *self,
+gtk_ui_manager_insert_action_group (GtkUIManager *manager,
GtkActionGroup *action_group,
gint pos)
{
const char *group_name;
#endif
- g_return_if_fail (GTK_IS_UI_MANAGER (self));
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- g_return_if_fail (g_list_find (self->private_data->action_groups,
+ g_return_if_fail (g_list_find (manager->private_data->action_groups,
action_group) == NULL);
#ifdef G_ENABLE_DEBUG
group_name = gtk_action_group_get_name (action_group);
- for (l = self->private_data->action_groups; l; l = l->next)
+ for (l = manager->private_data->action_groups; l; l = l->next)
{
GtkActionGroup *group = l->data;
#endif /* G_ENABLE_DEBUG */
g_object_ref (action_group);
- self->private_data->action_groups =
- g_list_insert (self->private_data->action_groups, action_group, pos);
+ manager->private_data->action_groups =
+ g_list_insert (manager->private_data->action_groups, action_group, pos);
g_object_connect (action_group,
- "object-signal::connect-proxy", G_CALLBACK (cb_proxy_connect_proxy), self,
- "object-signal::disconnect-proxy", G_CALLBACK (cb_proxy_disconnect_proxy), self,
- "object-signal::pre-activate", G_CALLBACK (cb_proxy_pre_activate), self,
- "object-signal::post-activate", G_CALLBACK (cb_proxy_post_activate), self,
+ "object-signal::connect-proxy", G_CALLBACK (cb_proxy_connect_proxy), manager,
+ "object-signal::disconnect-proxy", G_CALLBACK (cb_proxy_disconnect_proxy), manager,
+ "object-signal::pre-activate", G_CALLBACK (cb_proxy_pre_activate), manager,
+ "object-signal::post-activate", G_CALLBACK (cb_proxy_post_activate), manager,
NULL);
/* dirty all nodes, as action bindings may change */
- dirty_all_nodes (self);
+ dirty_all_nodes (manager);
- g_signal_emit (self, ui_manager_signals[ACTIONS_CHANGED], 0);
+ g_signal_emit (manager, ui_manager_signals[ACTIONS_CHANGED], 0);
}
/**
* gtk_ui_manager_remove_action_group:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
* @action_group: the action group to be removed
*
* Removes an action group from the list of action groups associated
- * with @self.
+ * with @manager.
*
* Since: 2.4
**/
void
-gtk_ui_manager_remove_action_group (GtkUIManager *self,
+gtk_ui_manager_remove_action_group (GtkUIManager *manager,
GtkActionGroup *action_group)
{
- g_return_if_fail (GTK_IS_UI_MANAGER (self));
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- g_return_if_fail (g_list_find (self->private_data->action_groups,
+ g_return_if_fail (g_list_find (manager->private_data->action_groups,
action_group) != NULL);
- self->private_data->action_groups =
- g_list_remove (self->private_data->action_groups, action_group);
+ manager->private_data->action_groups =
+ g_list_remove (manager->private_data->action_groups, action_group);
g_object_disconnect (action_group,
- "any-signal::connect-proxy", G_CALLBACK (cb_proxy_connect_proxy), self,
- "any-signal::disconnect-proxy", G_CALLBACK (cb_proxy_disconnect_proxy), self,
- "any-signal::pre-activate", G_CALLBACK (cb_proxy_pre_activate), self,
- "any-signal::post-activate", G_CALLBACK (cb_proxy_post_activate), self,
+ "any-signal::connect-proxy", G_CALLBACK (cb_proxy_connect_proxy), manager,
+ "any-signal::disconnect-proxy", G_CALLBACK (cb_proxy_disconnect_proxy), manager,
+ "any-signal::pre-activate", G_CALLBACK (cb_proxy_pre_activate), manager,
+ "any-signal::post-activate", G_CALLBACK (cb_proxy_post_activate), manager,
NULL);
g_object_unref (action_group);
/* dirty all nodes, as action bindings may change */
- dirty_all_nodes (self);
+ dirty_all_nodes (manager);
- g_signal_emit (self, ui_manager_signals[ACTIONS_CHANGED], 0);
+ g_signal_emit (manager, ui_manager_signals[ACTIONS_CHANGED], 0);
}
/**
* gtk_ui_manager_get_action_groups:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
*
- * Returns the list of action groups associated with @self.
+ * Returns the list of action groups associated with @manager.
*
* Return value: (element-type GtkActionGroup) (transfer none): a #GList of
* action groups. The list is owned by GTK+
* Since: 2.4
**/
GList *
-gtk_ui_manager_get_action_groups (GtkUIManager *self)
+gtk_ui_manager_get_action_groups (GtkUIManager *manager)
{
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), NULL);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), NULL);
- return self->private_data->action_groups;
+ return manager->private_data->action_groups;
}
/**
* gtk_ui_manager_get_accel_group:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
*
- * Returns the #GtkAccelGroup associated with @self.
+ * Returns the #GtkAccelGroup associated with @manager.
*
* Return value: (transfer none): the #GtkAccelGroup.
*
* Since: 2.4
**/
GtkAccelGroup *
-gtk_ui_manager_get_accel_group (GtkUIManager *self)
+gtk_ui_manager_get_accel_group (GtkUIManager *manager)
{
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), NULL);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), NULL);
- return self->private_data->accel_group;
+ return manager->private_data->accel_group;
}
/**
* gtk_ui_manager_get_widget:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @path: a path
*
* Looks up a widget by following a path.
* (e.g. "popup"). The root element ("/ui") can be omitted in the path.
*
* Note that the widget found by following a path that ends in a <menu>
- * element is the menuitem to which the menu is attached, not the menu itself.
+ * element is the menuitem to which the menu is attached, not the menu itmanager.
*
* Also note that the widgets constructed by a ui manager are not tied to
* the lifecycle of the ui manager. If you add the widgets returned by this
* Since: 2.4
**/
GtkWidget *
-gtk_ui_manager_get_widget (GtkUIManager *self,
+gtk_ui_manager_get_widget (GtkUIManager *manager,
const gchar *path)
{
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), NULL);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), NULL);
g_return_val_if_fail (path != NULL, NULL);
- return GTK_UI_MANAGER_GET_CLASS (self)->get_widget (self, path);
+ return GTK_UI_MANAGER_GET_CLASS (manager)->get_widget (manager, path);
}
typedef struct {
/**
* gtk_ui_manager_get_toplevels:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @types: specifies the types of toplevel widgets to include. Allowed
* types are #GTK_UI_MANAGER_MENUBAR, #GTK_UI_MANAGER_TOOLBAR and
* #GTK_UI_MANAGER_POPUP.
* Since: 2.4
**/
GSList *
-gtk_ui_manager_get_toplevels (GtkUIManager *self,
+gtk_ui_manager_get_toplevels (GtkUIManager *manager,
GtkUIManagerItemType types)
{
ToplevelData data;
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), NULL);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), NULL);
g_return_val_if_fail ((~(GTK_UI_MANAGER_MENUBAR |
GTK_UI_MANAGER_TOOLBAR |
GTK_UI_MANAGER_POPUP) & types) == 0, NULL);
data.types = types;
data.list = NULL;
- g_node_children_foreach (self->private_data->root_node,
+ g_node_children_foreach (manager->private_data->root_node,
G_TRAVERSE_ALL,
collect_toplevels, &data);
/**
* gtk_ui_manager_get_action:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @path: a path
*
* Looks up an action by following a path. See gtk_ui_manager_get_widget()
* Since: 2.4
**/
GtkAction *
-gtk_ui_manager_get_action (GtkUIManager *self,
+gtk_ui_manager_get_action (GtkUIManager *manager,
const gchar *path)
{
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), NULL);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), NULL);
g_return_val_if_fail (path != NULL, NULL);
- return GTK_UI_MANAGER_GET_CLASS (self)->get_action (self, path);
+ return GTK_UI_MANAGER_GET_CLASS (manager)->get_action (manager, path);
}
static gboolean
}
static GNode *
-get_child_node (GtkUIManager *self,
+get_child_node (GtkUIManager *manager,
GNode *parent,
GNode *sibling,
const gchar *childname,
else
{
/* handle root node */
- if (self->private_data->root_node)
+ if (manager->private_data->root_node)
{
- child = self->private_data->root_node;
+ child = manager->private_data->root_node;
if (strncmp (NODE_INFO (child)->name, childname, childname_length) != 0)
g_warning ("root node name '%s' doesn't match '%s'",
childname, NODE_INFO (child)->name);
mnode->name = g_strndup (childname, childname_length);
mnode->dirty = TRUE;
- child = self->private_data->root_node = g_node_new (mnode);
+ child = manager->private_data->root_node = g_node_new (mnode);
}
}
}
static GNode *
-get_node (GtkUIManager *self,
+get_node (GtkUIManager *manager,
const gchar *path,
NodeType node_type,
gboolean create)
else
length = strlen (pos);
- node = get_child_node (self, parent, NULL, pos, length, NODE_TYPE_UNDECIDED,
+ node = get_child_node (manager, parent, NULL, pos, length, NODE_TYPE_UNDECIDED,
create, FALSE);
if (!node)
return NULL;
/**
* gtk_ui_manager_new_merge_id:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
*
* Returns an unused merge id, suitable for use with
* gtk_ui_manager_add_ui().
* Since: 2.4
**/
guint
-gtk_ui_manager_new_merge_id (GtkUIManager *self)
+gtk_ui_manager_new_merge_id (GtkUIManager *manager)
{
- self->private_data->last_merge_id++;
+ manager->private_data->last_merge_id++;
- return self->private_data->last_merge_id;
+ return manager->private_data->last_merge_id;
}
static void
ParseState state;
ParseState prev_state;
- GtkUIManager *self;
+ GtkUIManager *manager;
GNode *current;
GError **error)
{
ParseContext *ctx = user_data;
- GtkUIManager *self = ctx->self;
+ GtkUIManager *manager = ctx->manager;
gint i;
const gchar *node_name;
if (ctx->state == STATE_ROOT && !strcmp (element_name, "accelerator"))
{
ctx->state = STATE_ACCELERATOR;
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_ACCELERATOR,
TRUE, FALSE);
if (ctx->state == STATE_START && !strcmp (element_name, "ui"))
{
ctx->state = STATE_ROOT;
- ctx->current = self->private_data->root_node;
+ ctx->current = manager->private_data->root_node;
raise_error = FALSE;
node_prepend_ui_reference (ctx->current, ctx->merge_id, action_quark);
if (ctx->state == STATE_ROOT && !strcmp (element_name, "menubar"))
{
ctx->state = STATE_MENU;
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_MENUBAR,
TRUE, FALSE);
}
else if (ctx->state == STATE_MENU && !strcmp (element_name, "menu"))
{
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_MENU,
TRUE, top);
{
ctx->state = STATE_MENU;
- ctx->current = get_child_node (self, g_node_last_child (ctx->current), NULL,
+ ctx->current = get_child_node (manager, g_node_last_child (ctx->current), NULL,
node_name, strlen (node_name),
NODE_TYPE_MENU,
TRUE, top);
GNode *node;
ctx->state = STATE_MENUITEM;
- node = get_child_node (self, ctx->current, NULL,
+ node = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_MENUITEM,
TRUE, top);
if (ctx->state == STATE_ROOT && !strcmp (element_name, "popup"))
{
ctx->state = STATE_MENU;
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_POPUP,
TRUE, FALSE);
!strcmp (element_name, "placeholder"))
{
if (ctx->state == STATE_TOOLBAR)
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_TOOLBAR_PLACEHOLDER,
TRUE, top);
else
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_MENU_PLACEHOLDER,
TRUE, top);
}
else
length = strlen (node_name);
- node = get_child_node (self, ctx->current, NULL,
+ node = get_child_node (manager, ctx->current, NULL,
node_name, length,
NODE_TYPE_SEPARATOR,
TRUE, top);
if (ctx->state == STATE_ROOT && !strcmp (element_name, "toolbar"))
{
ctx->state = STATE_TOOLBAR;
- ctx->current = get_child_node (self, ctx->current, NULL,
+ ctx->current = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_TOOLBAR,
TRUE, FALSE);
GNode *node;
ctx->state = STATE_TOOLITEM;
- node = get_child_node (self, ctx->current, NULL,
+ node = get_child_node (manager, ctx->current, NULL,
node_name, strlen (node_name),
NODE_TYPE_TOOLITEM,
TRUE, top);
/* should also walk through the tree and get rid of nodes related to
* this UI file's tag */
- gtk_ui_manager_remove_ui (ctx->self, ctx->merge_id);
+ gtk_ui_manager_remove_ui (ctx->manager, ctx->merge_id);
}
static gboolean
};
static guint
-add_ui_from_string (GtkUIManager *self,
+add_ui_from_string (GtkUIManager *manager,
const gchar *buffer,
gssize length,
gboolean needs_root,
GMarkupParseContext *context;
ctx.state = STATE_START;
- ctx.self = self;
+ ctx.manager = manager;
ctx.current = NULL;
- ctx.merge_id = gtk_ui_manager_new_merge_id (self);
+ ctx.merge_id = gtk_ui_manager_new_merge_id (manager);
context = g_markup_parse_context_new (&ui_parser, 0, &ctx, NULL);
g_markup_parse_context_free (context);
- queue_update (self);
+ queue_update (manager);
- g_object_notify (G_OBJECT (self), "ui");
+ g_object_notify (G_OBJECT (manager), "ui");
return ctx.merge_id;
/**
* gtk_ui_manager_add_ui_from_string:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
* @buffer: the string to parse
* @length: the length of @buffer (may be -1 if @buffer is nul-terminated)
* @error: return location for an error
*
* Parses a string containing a <link linkend="XML-UI">UI definition</link> and
- * merges it with the current contents of @self. An enclosing <ui>
+ * merges it with the current contents of @manager. An enclosing <ui>
* element is added if it is missing.
*
* Return value: The merge id for the merged UI. The merge id can be used
* Since: 2.4
**/
guint
-gtk_ui_manager_add_ui_from_string (GtkUIManager *self,
+gtk_ui_manager_add_ui_from_string (GtkUIManager *manager,
const gchar *buffer,
gssize length,
GError **error)
const gchar *p;
const gchar *end;
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), 0);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), 0);
g_return_val_if_fail (buffer != NULL, 0);
if (length < 0)
if (end - p >= 4 && strncmp (p, "<ui>", 4) == 0)
needs_root = FALSE;
- return add_ui_from_string (self, buffer, length, needs_root, error);
+ return add_ui_from_string (manager, buffer, length, needs_root, error);
}
/**
* gtk_ui_manager_add_ui_from_file:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
* @filename: the name of the file to parse
* @error: return location for an error
*
* Parses a file containing a <link linkend="XML-UI">UI definition</link> and
- * merges it with the current contents of @self.
+ * merges it with the current contents of @manager.
*
* Return value: The merge id for the merged UI. The merge id can be used
* to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
* Since: 2.4
**/
guint
-gtk_ui_manager_add_ui_from_file (GtkUIManager *self,
+gtk_ui_manager_add_ui_from_file (GtkUIManager *manager,
const gchar *filename,
GError **error)
{
gsize length;
guint res;
- g_return_val_if_fail (GTK_IS_UI_MANAGER (self), 0);
+ g_return_val_if_fail (GTK_IS_UI_MANAGER (manager), 0);
if (!g_file_get_contents (filename, &buffer, &length, error))
return 0;
- res = add_ui_from_string (self, buffer, length, FALSE, error);
+ res = add_ui_from_string (manager, buffer, length, FALSE, error);
g_free (buffer);
return res;
/**
* gtk_ui_manager_add_ui:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
* @merge_id: the merge id for the merged UI, see gtk_ui_manager_new_merge_id()
* @path: a path
* @name: the name for the added UI element
* @top: if %TRUE, the UI element is added before its siblings, otherwise it
* is added after its siblings.
*
- * Adds a UI element to the current contents of @self.
+ * Adds a UI element to the current contents of @manager.
*
* If @type is %GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
* separator if such an element can be inserted at the place determined by
* Since: 2.4
**/
void
-gtk_ui_manager_add_ui (GtkUIManager *self,
+gtk_ui_manager_add_ui (GtkUIManager *manager,
guint merge_id,
const gchar *path,
const gchar *name,
NodeType node_type;
GQuark action_quark = 0;
- g_return_if_fail (GTK_IS_UI_MANAGER (self));
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
g_return_if_fail (merge_id > 0);
g_return_if_fail (name != NULL || type == GTK_UI_MANAGER_SEPARATOR);
- node = get_node (self, path, NODE_TYPE_UNDECIDED, FALSE);
+ node = get_node (manager, path, NODE_TYPE_UNDECIDED, FALSE);
sibling = NULL;
if (node == NULL)
return;
}
- child = get_child_node (self, node, sibling,
+ child = get_child_node (manager, node, sibling,
name, name ? strlen (name) : 0,
node_type, TRUE, top);
if (NODE_INFO (child)->action_name == 0)
NODE_INFO (child)->action_name = action_quark;
- queue_update (self);
+ queue_update (manager);
- g_object_notify (G_OBJECT (self), "ui");
+ g_object_notify (G_OBJECT (manager), "ui");
}
static gboolean
/**
* gtk_ui_manager_remove_ui:
- * @self: a #GtkUIManager object
+ * @manager: a #GtkUIManager object
* @merge_id: a merge id as returned by gtk_ui_manager_add_ui_from_string()
*
- * Unmerges the part of @self<!-- -->s content identified by @merge_id.
+ * Unmerges the part of @manager<!-- -->s content identified by @merge_id.
*
* Since: 2.4
**/
void
-gtk_ui_manager_remove_ui (GtkUIManager *self,
+gtk_ui_manager_remove_ui (GtkUIManager *manager,
guint merge_id)
{
- g_return_if_fail (GTK_IS_UI_MANAGER (self));
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
- g_node_traverse (self->private_data->root_node,
+ g_node_traverse (manager->private_data->root_node,
G_POST_ORDER, G_TRAVERSE_ALL, -1,
remove_ui, GUINT_TO_POINTER (merge_id));
- queue_update (self);
+ queue_update (manager);
- g_object_notify (G_OBJECT (self), "ui");
+ g_object_notify (G_OBJECT (manager), "ui");
}
/* -------------------- Updates -------------------- */
}
static void
-update_node (GtkUIManager *self,
+update_node (GtkUIManager *manager,
GNode *node,
gboolean in_popup,
gboolean popup_accels)
ref = info->uifiles->data;
action_name = g_quark_to_string (ref->action_quark);
- action = get_action_by_name (self, action_name);
+ action = get_action_by_name (manager, action_name);
info->dirty = FALSE;
}
if (action)
- gtk_action_set_accel_group (action, self->private_data->accel_group);
+ gtk_action_set_accel_group (action, manager->private_data->accel_group);
/* If the widget already has a proxy and the action hasn't changed, then
* we only have to update the tearoff menu items.
siblings = gtk_container_get_children (GTK_CONTAINER (menu));
if (siblings != NULL && GTK_IS_TEAROFF_MENU_ITEM (siblings->data))
{
- if (self->private_data->add_tearoffs && !in_popup)
+ if (manager->private_data->add_tearoffs && !in_popup)
gtk_widget_show (GTK_WIDGET (siblings->data));
else
gtk_widget_hide (GTK_WIDGET (siblings->data));
g_object_ref_sink (info->proxy);
gtk_widget_set_name (info->proxy, info->name);
gtk_widget_show (info->proxy);
- g_signal_emit (self, ui_manager_signals[ADD_WIDGET], 0, info->proxy);
+ g_signal_emit (manager, ui_manager_signals[ADD_WIDGET], 0, info->proxy);
}
break;
case NODE_TYPE_POPUP:
siblings = gtk_container_get_children (GTK_CONTAINER (menu));
if (siblings != NULL && GTK_IS_TEAROFF_MENU_ITEM (siblings->data))
{
- if (self->private_data->add_tearoffs && !in_popup)
+ if (manager->private_data->add_tearoffs && !in_popup)
gtk_widget_show (GTK_WIDGET (siblings->data));
else
gtk_widget_hide (GTK_WIDGET (siblings->data));
g_object_ref_sink (info->proxy);
gtk_widget_set_name (info->proxy, info->name);
gtk_widget_show (info->proxy);
- g_signal_emit (self, ui_manager_signals[ADD_WIDGET], 0, info->proxy);
+ g_signal_emit (manager, ui_manager_signals[ADD_WIDGET], 0, info->proxy);
}
break;
case NODE_TYPE_MENU_PLACEHOLDER:
current = child;
child = current->next;
- update_node (self, current, in_popup, popup_accels);
+ update_node (manager, current, in_popup, popup_accels);
}
if (info->proxy)
}
static gboolean
-do_updates (GtkUIManager *self)
+do_updates (GtkUIManager *manager)
{
/* this function needs to check through the tree for dirty nodes.
* For such nodes, it needs to do the following:
* the proxy is reconnected to the new action (or a new proxy widget
* is created and added to the parent container).
*/
- update_node (self, self->private_data->root_node, FALSE, FALSE);
+ update_node (manager, manager->private_data->root_node, FALSE, FALSE);
- self->private_data->update_tag = 0;
+ manager->private_data->update_tag = 0;
return FALSE;
}
static gboolean
-do_updates_idle (GtkUIManager *self)
+do_updates_idle (GtkUIManager *manager)
{
- do_updates (self);
+ do_updates (manager);
return FALSE;
}
static void
-queue_update (GtkUIManager *self)
+queue_update (GtkUIManager *manager)
{
- if (self->private_data->update_tag != 0)
+ if (manager->private_data->update_tag != 0)
return;
- self->private_data->update_tag = gdk_threads_add_idle (
+ manager->private_data->update_tag = gdk_threads_add_idle (
(GSourceFunc)do_updates_idle,
- self);
+ manager);
}
/**
* gtk_ui_manager_ensure_update:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
*
* Makes sure that all pending updates to the UI have been completed.
*
* Since: 2.4
**/
void
-gtk_ui_manager_ensure_update (GtkUIManager *self)
+gtk_ui_manager_ensure_update (GtkUIManager *manager)
{
- if (self->private_data->update_tag != 0)
+ if (manager->private_data->update_tag != 0)
{
- g_source_remove (self->private_data->update_tag);
- do_updates (self);
+ g_source_remove (manager->private_data->update_tag);
+ do_updates (manager);
}
}
}
static void
-dirty_all_nodes (GtkUIManager *self)
+dirty_all_nodes (GtkUIManager *manager)
{
- g_node_traverse (self->private_data->root_node,
+ g_node_traverse (manager->private_data->root_node,
G_PRE_ORDER, G_TRAVERSE_ALL, -1,
dirty_traverse_func, NULL);
- queue_update (self);
+ queue_update (manager);
}
static void
}
static void
-print_node (GtkUIManager *self,
+print_node (GtkUIManager *manager,
GNode *node,
gint indent_level,
GString *buffer)
g_string_append (buffer, close_fmt ? ">\n" : "/>\n");
for (child = node->children; child != NULL; child = child->next)
- print_node (self, child, indent_level + 2, buffer);
+ print_node (manager, child, indent_level + 2, buffer);
if (close_fmt)
g_string_append_printf (buffer, close_fmt, indent_level, "");
ctx = g_new0 (ParseContext, 1);
ctx->state = STATE_START;
- ctx->self = GTK_UI_MANAGER (buildable);
+ ctx->manager = GTK_UI_MANAGER (buildable);
ctx->current = NULL;
ctx->merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (buildable));
/**
* gtk_ui_manager_get_ui:
- * @self: a #GtkUIManager
+ * @manager: a #GtkUIManager
*
* Creates a <link linkend="XML-UI">UI definition</link> of the merged UI.
*
* Since: 2.4
**/
gchar *
-gtk_ui_manager_get_ui (GtkUIManager *self)
+gtk_ui_manager_get_ui (GtkUIManager *manager)
{
GString *buffer;
buffer = g_string_new (NULL);
- gtk_ui_manager_ensure_update (self);
+ gtk_ui_manager_ensure_update (manager);
- print_node (self, self->private_data->root_node, 0, buffer);
+ print_node (manager, manager->private_data->root_node, 0, buffer);
return g_string_free (buffer, FALSE);
}
GObjectClass parent_class;
/* Signals */
- void (* add_widget) (GtkUIManager *merge,
+ void (* add_widget) (GtkUIManager *manager,
GtkWidget *widget);
- void (* actions_changed) (GtkUIManager *merge);
- void (* connect_proxy) (GtkUIManager *merge,
+ void (* actions_changed) (GtkUIManager *manager);
+ void (* connect_proxy) (GtkUIManager *manager,
GtkAction *action,
GtkWidget *proxy);
- void (* disconnect_proxy) (GtkUIManager *merge,
+ void (* disconnect_proxy) (GtkUIManager *manager,
GtkAction *action,
GtkWidget *proxy);
- void (* pre_activate) (GtkUIManager *merge,
+ void (* pre_activate) (GtkUIManager *manager,
GtkAction *action);
- void (* post_activate) (GtkUIManager *merge,
+ void (* post_activate) (GtkUIManager *manager,
GtkAction *action);
/* Virtual functions */
GType gtk_ui_manager_get_type (void) G_GNUC_CONST;
GtkUIManager *gtk_ui_manager_new (void);
-void gtk_ui_manager_set_add_tearoffs (GtkUIManager *self,
+void gtk_ui_manager_set_add_tearoffs (GtkUIManager *manager,
gboolean add_tearoffs);
-gboolean gtk_ui_manager_get_add_tearoffs (GtkUIManager *self);
-void gtk_ui_manager_insert_action_group (GtkUIManager *self,
+gboolean gtk_ui_manager_get_add_tearoffs (GtkUIManager *manager);
+void gtk_ui_manager_insert_action_group (GtkUIManager *manager,
GtkActionGroup *action_group,
gint pos);
-void gtk_ui_manager_remove_action_group (GtkUIManager *self,
+void gtk_ui_manager_remove_action_group (GtkUIManager *manager,
GtkActionGroup *action_group);
-GList *gtk_ui_manager_get_action_groups (GtkUIManager *self);
-GtkAccelGroup *gtk_ui_manager_get_accel_group (GtkUIManager *self);
-GtkWidget *gtk_ui_manager_get_widget (GtkUIManager *self,
+GList *gtk_ui_manager_get_action_groups (GtkUIManager *manager);
+GtkAccelGroup *gtk_ui_manager_get_accel_group (GtkUIManager *manager);
+GtkWidget *gtk_ui_manager_get_widget (GtkUIManager *manager,
const gchar *path);
-GSList *gtk_ui_manager_get_toplevels (GtkUIManager *self,
+GSList *gtk_ui_manager_get_toplevels (GtkUIManager *manager,
GtkUIManagerItemType types);
-GtkAction *gtk_ui_manager_get_action (GtkUIManager *self,
+GtkAction *gtk_ui_manager_get_action (GtkUIManager *manager,
const gchar *path);
-guint gtk_ui_manager_add_ui_from_string (GtkUIManager *self,
+guint gtk_ui_manager_add_ui_from_string (GtkUIManager *manager,
const gchar *buffer,
gssize length,
GError **error);
-guint gtk_ui_manager_add_ui_from_file (GtkUIManager *self,
+guint gtk_ui_manager_add_ui_from_file (GtkUIManager *manager,
const gchar *filename,
GError **error);
-void gtk_ui_manager_add_ui (GtkUIManager *self,
+void gtk_ui_manager_add_ui (GtkUIManager *manager,
guint merge_id,
const gchar *path,
const gchar *name,
const gchar *action,
GtkUIManagerItemType type,
gboolean top);
-void gtk_ui_manager_remove_ui (GtkUIManager *self,
+void gtk_ui_manager_remove_ui (GtkUIManager *manager,
guint merge_id);
-gchar *gtk_ui_manager_get_ui (GtkUIManager *self);
-void gtk_ui_manager_ensure_update (GtkUIManager *self);
-guint gtk_ui_manager_new_merge_id (GtkUIManager *self);
+gchar *gtk_ui_manager_get_ui (GtkUIManager *manager);
+void gtk_ui_manager_ensure_update (GtkUIManager *manager);
+guint gtk_ui_manager_new_merge_id (GtkUIManager *manager);
G_END_DECLS
/**
* gtk_viewport_get_hadjustment:
* @viewport: a #GtkViewport.
- *
+ *
* Returns the horizontal adjustment of the viewport.
*
- * Return value: the horizontal adjustment of @viewport.
+ * Return value: (transfer none): the horizontal adjustment of @viewport.
**/
GtkAdjustment*
gtk_viewport_get_hadjustment (GtkViewport *viewport)
*
* Returns the vertical adjustment of the viewport.
*
- * Return value: the vertical adjustment of @viewport.
+ * Return value: (transfer none): the vertical adjustment of @viewport.
**/
GtkAdjustment*
gtk_viewport_get_vadjustment (GtkViewport *viewport)
*
* Gets the bin window of the #GtkViewport.
*
- * Return value: a #GdkWindow
+ * Return value: (transfer none): a #GdkWindow
*
* Since: 2.20
**/
/**
* gtk_widget_create_pango_context:
* @widget: a #GtkWidget
- *
+ *
* Creates a new #PangoContext with the appropriate font map,
* font description, and base direction for drawing text for
* this widget. See also gtk_widget_get_pango_context().
- *
- * Return value: the new #PangoContext
+ *
+ * Return value: (transfer full): the new #PangoContext
**/
PangoContext *
gtk_widget_create_pango_context (GtkWidget *widget)
* gtk_widget_create_pango_layout:
* @widget: a #GtkWidget
* @text: text to set on the layout (can be %NULL)
- *
+ *
* Creates a new #PangoLayout with the appropriate font map,
* font description, and base direction for drawing text for
* this widget.
* If you keep a #PangoLayout created in this way around, in order to
* notify the layout of changes to the base direction or font of this
* widget, you must call pango_layout_context_changed() in response to
- * the #GtkWidget::style-set and #GtkWidget::direction-changed signals
+ * the #GtkWidget::style-set and #GtkWidget::direction-changed signals
* for the widget.
- *
- * Return value: the new #PangoLayout
+ *
+ * Return value: (transfer full): the new #PangoLayout
**/
PangoLayout *
gtk_widget_create_pango_layout (GtkWidget *widget,
* the application and should not be modified. The pixbuf should be freed
* after use with g_object_unref().
*
- * Return value: a new pixbuf, or %NULL if the stock ID wasn't known
+ * Return value: (transferi full): a new pixbuf, or %NULL if the
+ * stock ID wasn't known
**/
GdkPixbuf*
gtk_widget_render_icon (GtkWidget *widget,
* Returns the default widget for @window. See gtk_window_set_default()
* for more details.
*
- * Returns: the default widget, or %NULL if there is none.
+ * Returns: (transfer none): the default widget, or %NULL if there is none.
*
* Since: 2.14
**/
}
}
-/**
+/**
* gtk_window_get_screen:
* @window: a #GtkWindow.
*
/**
* gtk_wrap_box_new:
- * @allocation_mode: The #GtkWrapAllocationMode to use
+ * @mode: The #GtkWrapAllocationMode to use
* @spreading: The #GtkWrapBoxSpreading policy to use
* @horizontal_spacing: The horizontal spacing to add between children
* @vertical_spacing: The vertical spacing to add between children
GtkWrapBoxSpreading spreading,
guint horizontal_spacing,
guint vertical_spacing);
-void gtk_wrap_box_set_allocation_mode (GtkWrapBox *layout,
+void gtk_wrap_box_set_allocation_mode (GtkWrapBox *box,
GtkWrapAllocationMode mode);
-GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *layout);
+GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *box);
-void gtk_wrap_box_set_spreading (GtkWrapBox *layout,
+void gtk_wrap_box_set_spreading (GtkWrapBox *box,
GtkWrapBoxSpreading spreading);
-GtkWrapBoxSpreading gtk_wrap_box_get_spreading (GtkWrapBox *layout);
+GtkWrapBoxSpreading gtk_wrap_box_get_spreading (GtkWrapBox *box);
-void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *layout,
+void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *box,
guint spacing);
-guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *layout);
+guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *box);
-void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *layout,
+void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *box,
guint spacing);
-guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *layout);
+guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *box);
-void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *layout,
+void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *box,
guint n_children);
-guint gtk_wrap_box_get_minimum_line_children (GtkWrapBox *layout);
+guint gtk_wrap_box_get_minimum_line_children (GtkWrapBox *box);
-void gtk_wrap_box_set_natural_line_children (GtkWrapBox *layout,
+void gtk_wrap_box_set_natural_line_children (GtkWrapBox *box,
guint n_children);
-guint gtk_wrap_box_get_natural_line_children (GtkWrapBox *layout);
+guint gtk_wrap_box_get_natural_line_children (GtkWrapBox *box);
-void gtk_wrap_box_insert_child (GtkWrapBox *layout,
+void gtk_wrap_box_insert_child (GtkWrapBox *box,
GtkWidget *widget,
gint index,
GtkWrapBoxPacking packing);
-void gtk_wrap_box_reorder_child (GtkWrapBox *layout,
+void gtk_wrap_box_reorder_child (GtkWrapBox *box,
GtkWidget *widget,
guint index);